我正在运行Mod_Security,并使用SecServerSignature来自定义Apache返回的Server
头。 这部分工作正常,但是我也运行mod_fcgid附加“mod_fcgid / 2.3.5”头。
有什么办法可以把这个关掉吗? ServerSignature off
服务器ServerSignature off
不起任何作用。 我能够通过更改ServerTokens
来消除它,但删除了我添加的定制。
ServerTokens
是操纵Server
响应头的东西。 ( ServerSignature
用于服务器生成的文档。)
但是,如果你想完全控制Server
头,我会build议使用Header
选项:
Header set Server "Apache/2 my_customizations"
举个例子。
您可能需要重新sortingApache中的模块加载,以便在mod_fcgi之后加载mod_security。
阅读mod_security文档的“Server identity masking”部分。
http://www.modsecurity.org/documentation/modsecurity-apache/1.9.3/html-multipage/06-special_features.html
两个注意事项:Mod_security将在error_log中显示真实的服务器签名,与给予公众的签名不同。
其次,该文件还解释说,SecServerSignature指令只适用于ServerTokens设置为“Full”
标记
在configuration文件中使用ServerTokens
。
ServerTokens
该指令将您返回的内容configuration为Server HTTP响应标题。 缺省值是“Full”,它发送有关OS-Type的信息并在模块中编译。
设置为以下之一: Full
| OS
| Minor
| Minimal
| | Major
| Full
传达最多的信息, Prod
最less。
我build议将其设置为Prod
,那么他们只会看到您Apache Server at domain.com Port 80
上使用Apache Server at domain.com Port 80
。
不要忘记重新启动/重新加载Apacheconfiguration文件!
https://httpd.apache.org/docs/2.2/mod/core.html#servertokens