Tomcat Hidden Server Name

Source: Internet
Author: User

    • Hide Header ServerName in HTTP requests
      Method One

      In the Tomcat/lib/tomcat-coyote.jar

        以下两个文件          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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.