首页 > 其他 > 详细

LAMP安全设置

时间:2015-11-16 17:45:41      阅读:280      评论:0      收藏:0      [点我收藏+]

使用 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

LAMP安全设置

原文:http://my.oschina.net/zhailibao2010/blog/530983

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!