分享

关闭 php X-Powered-By 信息

 离魂异客 2013-10-10

在请求头的时候可以看到 X-Powered-By 字样,为了 安全可以去掉.看你的需要了

linux 下 执行 curl -head http://blog. 会显示出如下信息

HTTP/1.1 200 OK
Date: Tue, 26 Oct 2010 02:53:56 GMT
Server: Apache
X-Powered-By: PHP/5.2.1
Vary: Accept-Encoding
Connection: close
Content-Type: text/html; charset=UTF-8 

要去掉  X-Powered-By: PHP/5.2.1
则修改 php.ini 文件 设置 expose_php = Off

说明  
Decides whether PHP may expose the fact that it is installed on the server
 (e.g. by adding its signature to the Web server header).  It is no security
 threat in any way, but it makes it possible to determine whether you use PHP
on your server or not.

决定服务器上是否暴露安装有PHP,
(例如:把这些信息加到Web服务器头响应)。这是不安全的。
但能确定你的服务器时候运行着PHP。
意思就是打开的话可以告诉其他人这台服务器可以运行PHP,但不一定安全,可以关掉

关闭输出 X-Powered-By 信息

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多