上一篇: Linux内核简单升级到 2.6.28
隐藏 Apache PHP 的版本号
[ 2009/03/27 23:52 | by selboo ]
Apache:
开启 httpd.conf,加入以下两行:
ServerTokens ProductOnly
ServerSignature Off
PHP:
隐藏 PHP 版本就是隐藏类似于 "X-Powered-By: PHP/5.1.2-1+b1" 这个,开启 php.ini,加入:
php.ini
expose_php On
改成
expose_php Off
修改前
[root@selboo171 conf]# curl --head http://192.168.1.171
HTTP/1.1 200 OK
Date: Sat, 28 Mar 2009 12:15:59 GMT
Server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8b DAV/2 PHP/5.2.9
Last-Modified: Sat, 20 Nov 2004 20:16:24 GMT
ETag: "9f6d3-2c-3e9564c23b600"
Accept-Ranges: bytes
Content-Length: 44
Content-Type: text/html
修改后
[root@selboo171 conf]# curl --head http://192.168.1.171
HTTP/1.1 200 OK
Date: Sat, 28 Mar 2009 12:16:15 GMT
Server: Apache
Last-Modified: Sat, 20 Nov 2004 20:16:24 GMT
ETag: "9f6d3-2c-3e9564c23b600"
Accept-Ranges: bytes
Content-Length: 44
Content-Type: text/html
最后编辑: selboo 编辑于2009/03/28 18:33