nginx

    修改nginx.conf http标签

server_tokens off;

apache:

    在apache配置文件httpd.conf中,加入以下代码

ServerTokens Prod
ServerSignature Off

php:


    在php配置文件php.ini中,加入以下代码

expose_php = Off

tomcat:    

cd  /usr/local/tomcat/lib
unzip catalina.jar
cd org/apache/catalina/util
vim ServerInfo.properties
修改:
server.info=Apache Tomcat/7.0.52 (Ubuntu)
server.number=7.0.52.0
server.built=Jun 30 2016 01:59:37
压缩回jar包
cd  /usr/local/tomcat/lib
jar uvf catalina.jar org/apache/catalina/util/ServerInfo.properties
重启tomcat