>ServerTokens ProductOnly 和 ServerSignature Off 微调 Apache 的返回信息

http://windtear.net/archives/2005/05/30/000676.html

apache 的 httpd.conf 有两个配置可以控制是否显示服务器信息给用户
ServerTokens
ServerSignature

默认条件下会把apache版本 系统 模块都显示出来 (HTTP 返回头)
还有如果列举目录的话 会显示域名信息(文件列表正文)
(http://httpd.apache.org/docs/mod/core.html表明ServerSignature已经默认Off了)
如果不想要就可以调这两个参数

ServerTokens
ServerSignature

ServerSignature On|Off|EMail
ServerTokens Minimal|ProductOnly|OS|Full

ServerTokens Prod[uctOnly]
    Server sends (e.g.): Server: Apache
ServerTokens Min[imal]
    Server sends (e.g.): Server: Apache/1.3.0
ServerTokens OS
    Server sends (e.g.): Server: Apache/1.3.0 (Unix)
ServerTokens Full (or not specified)
    Server sends (e.g.): Server: Apache/1.3.0 (Unix) PHP/3.0 MyMod/1.2

 

(Visited 113 times, 1 visits today)