Tomcat hides the Server Name and tomcatserver
The following two files are org/apache/coyote/http11/Constants. java and org/apache/coyote/ajp/Constants. in java, find public static final byte [] SERVER_BYTES = ByteChunk. convertToBytes ("Server: Apache-Coyote/1.1" + CRLF); then modify the red part.
Method 2 (recommended)
Modify % atat_home %/conf/server. xml
<Connector port="80" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxThreads="8192" minSpareThreads="64" maxSpareThreads="128" acceptCount="128" enableLookups="false" server="Neo App Srv 1.0"/>
Add a row
Server = "Neo App Srv 1.0". You can define this as needed.
-Hide version numbers of error pages such as 404 and 500.
For example
The modification method is in TOMCAT_HOME/lib/catalina. jar.
Find \ org \ apache \ catalina \ util \ ServerInfo. properties
Take it out separately, modify it, and drag it in directly.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.