以下两个文件 org/apache/coyote/http11/Constants.java 和 org/apache/coyote/ajp/Constants.java 这两个文件中查找 publicstaticfinalbyte[] SERVER_BYTES = ByteChunk.convertToBytes("Server: Apache-Coyote/1.1" + CRLF); 然后修改红色部分
Method Two (recommended)
Modify%tomcat_home%/conf/server.xml
<Connector Port="a" Protocol="http/1.1" ConnectionTimeout="20000" Redirectport="8443" MaxThreads="8192" minsparethreads=" the" maxsparethreads=" the" Acceptcount=" the" enablelookups="false" Server="Neo App SRV 1.0"/>
Add a row
Server= "Neo App SRV 1.0" is OK, this can be defined casually
-Hide 404, 500, etc. error page version number information
Such as
The method of modification is in Tomcat_home/lib/catalina.jar
Find \org\apache\catalina\util\serverinfo.properties
Take it out alone, modify it and drag it directly in.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Tomcat Hidden Server Name