标签:
使用 curl -I www.nginx.org/index.php
或者使用chrome 浏览器开发工具查看
默认response header:
Connection:keep-alive Content-Type:text/html Date:Mon, 16 Nov 2015 08:16:17 GMT Server:nginx/1.8.0 Transfer-Encoding:chunked X-Powered-By:PHP/5.4.16
修改配置参数:
vim /etc/nginx/nginx.conf
http {
server_tokens off;
}
vim /etc/php.ini
expose_php = Off
systemctl reload nginx.service
systemctl reload php-fpm.service
修改后header :
Connection:keep-alive Content-Type:text/html Date:Mon, 16 Nov 2015 08:22:01 GMT Server:nginx Transfer-Encoding:chunked
标签:
原文地址:http://my.oschina.net/zhailibao2010/blog/530983