- 1
- 4,339
- A
所属分类:WEB应用
nginx
修改nginx.conf http标签
Shell
server_tokens off;
1 | server_tokens off; |
---|
apache:
在apache配置文件httpd.conf中,加入以下代码
Shell
ServerTokens Prod ServerSignature Off
12 | ServerTokens ProdServerSignature Off |
---|
php:
在php配置文件php.ini中,加入以下代码
Shell
expose_php = Off
1 | expose_php = Off |
---|
tomcat:
Shell
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
123456789101112 | cd /usr/local/tomcat/libunzip catalina.jarcd org/apache/catalina/utilvim ServerInfo.properties修改:server.info=Apache Tomcat/7.0.52 (Ubuntu)server.number=7.0.52.0server.built=Jun 30 2016 01:59:37压缩回jar包cd /usr/local/tomcat/libjar uvf catalina.jar org/apache/catalina/util/ServerInfo.properties重启tomcat |
---|