Home  >  Article  >  Backend Development  >  How to hide nginx and php versions

How to hide nginx and php versions

王林
王林Original
2020-08-19 16:01:482648browse

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;

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

Centos7.X restart command:

systemctl restart php-fpm

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!

Statement:
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