tomcat hide the version information

tomcat start, you can see the version information to access the default tomcat, but for the operation and maintenance personnel is concerned, need to know how to hide tomcat version information, after all, not the same as the various versions of loopholes to avoid hacker attacks molecule.
Here Insert Picture Description
This version information is written in the configuration file of death, we can modify the
file location in tomcat installation position /lib/catalina.jar following location org / apache / catalina / util / ServerInfo.properties

In windows platform, we can use WinRAR software to open for modification.
Here Insert Picture Description

Modified version out

#server.info=Apache Tomcat/8.0.37
server.info=huangbaokang version
server.number=8.0.37.0
server.built=Sep 1 2016 10:01:52 UTC

Restart tomcat can be.
Here Insert Picture Description

Considering that most tomcat server deployed in the linux platform, it is estimated will encounter some small partners will not edit jar package configuration file and other issues.
To demonstrate, I catalina.jar into a linux server virtual machine I built / root directory under the
precondition installed unzip, but most of the linux operating system comes with a unzip, if not, use yum install.

yum install unzip zip

Direct use vim catalina.jar, will automatically unzip the file name, our search file names, vi command with similar input / ServerInfo enter, will highlight the searched file.
Here Insert Picture Description
Use the keyboard arrow keys to navigate to the file we want to edit, hit Enter, edit files, edit mode, press the i, finally: wq save it,

Guess you like

Origin blog.csdn.net/huangbaokang/article/details/94742695