Nginx:
在 nginx 配置文件 nginx.conf 中, 加入以下代码:
- server_tokens off;
- Apache:
在 apache 配置文件 httpd.conf 中, 加入以下代码:
- ServerTokens Prod
- ServerSignature Off
PHP:
在 PHP 配置文件 PHP.INI 中, 加入以下代码:
expose_php = Off
修改完重启服务.
来源: http://www.bubuko.com/infodetail-3075177.html