Home > Article > Backend Development > How to hide nginx and php versions
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.
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!