How to hide nginx and php versions

王林
Release: 2023-03-04 19:20:02
Original
2574 people have browsed it

How to hide nginx and php versions: First open the nginx.conf configuration file; then modify the configuration [server_tokens off]; then open the php.ini configuration file; finally modify the configuration [expose_php = Off] and restart the service That’s it.

How to hide nginx and php versions

First open the nginx.conf configuration file;

(Recommended tutorial: php graphic tutorial)

Then modify server_tokens to off. After modification, you need to execute the command nginx -s reload to reload the configuration.

server_tokens off;
Copy after login

Then open the php.ini file;

Finally modify the parameters of expose_php to Off and restart the php-fpm service.

(Learning video recommendation: php video tutorial)

Centos6.X restart command:

service php-fpm restart
Copy after login

Centos7.X restart command:

systemctl restart php-fpm
Copy after login

The above is the detailed content of How to hide nginx and php versions. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!