有没有办法掩盖我真正的服务器技术说从PHP到http://builtwith.com等网站检查时显示为Python ?或者至少不显示任何东西?
假设您正在使用apache,您可以使用ServerTokens和ServerSignature指令更改默认的"tell all"行为:
ServerTokens Prod
ServerSignature Off
Run Code Online (Sandbox Code Playgroud)
这将从错误页面中删除识别标记,并仅返回带有HTTP请求的服务器名称,而不是所有已安装的模块.这是一个ServerTokens
注释掉的例子:
14:45:52 bartley:~ > curl -I http://www.test.com
HTTP/1.1 200 OK
Date: Mon, 16 May 2011 13:54:48 GMT
Server: Apache/2.2.15 (EL) DAV/2 PHP/5.2.16 mod_ssl/2.2.15 OpenSSL/0.9.8e-fips-rhel5 mod_perl/2.0.4 Perl/v5.8.8
Accept-Ranges: bytes
Content-Length: 16457
Cache-Control: max-age=300, must-revalidate
Expires: Mon, 16 May 2011 13:59:48 GMT
Vary: Accept-Encoding,Cookie
Connection: close
Content-Type: text/html; charset=UTF-8
Run Code Online (Sandbox Code Playgroud)
..这里是一个设置为Prod
:
14:44:25 bartley:~ > curl -I http://www.test.com
HTTP/1.1 200 OK
Date: Mon, 16 May 2011 13:54:19 GMT
Server: Apache
Accept-Ranges: bytes
Content-Length: 16457
Cache-Control: max-age=300, must-revalidate
Expires: Mon, 16 May 2011 13:59:19 GMT
Vary: Accept-Encoding,Cookie
Connection: close
Content-Type: text/html; charset=UTF-8
Run Code Online (Sandbox Code Playgroud)
编辑:正如@Marc指出的那样,PHP还可以添加X-Powered-By
标头的HTTP标头.这可以通过添加expose_php = Off
您的php.ini
.
归档时间: |
|
查看次数: |
4532 次 |
最近记录: |