在httpd.conf中加入下面两项directive
- ServerSignature Off
- ServerTokens Prod
下面是ServerTokens的可能取值
- ServerTokens Prod echo "Server:Apache"
- ServerTokens Major echo "Server:Apache/2"
- ServerTokens Minor echo "Server:Apache/2.4"
- ServerTokens Min echo "Server:Apache/2.4.3"
- ServerTokens OS echo "Server:Apache/2.4.3 (Unix)"
- ServerTokens Full echo "Server:Apache/2.4.3 (Unix) PHP/5.5.3"
加入配置,httpd -t检查语法
执行httpd -k graceful