隐藏Nginx或Apache以及PHP的版本号的方法
隐藏Nginx或Apache以及PHP的版本号的方法
Nginx:
在nginx配置文件nginx.conf http段中,加入以下代码
server_tokens off;
Apache:
在apache配置文件httpd.conf中,加入以下代码
ServerTokens Prod
ServerSignature Off
PHP
在php配置文件php.ini中,加入以下代码
expose_php = Off
在nginx配置文件nginx.conf http段中,加入以下代码
server_tokens off;
在apache配置文件httpd.conf中,加入以下代码
ServerTokens Prod
ServerSignature Off
在php配置文件php.ini中,加入以下代码
expose_php = Off