Get Started > Configuration and Administration > Change the Default Port of the Tomcat Server

Change the Default Port of the Tomcat Server

The default port value (8443) of the Tomcat Server may conflict with an existing application (for example, another web application already uses this port). If such a conflict exists, change the default port as follows:

  1. Locate the file server.xml in $CATALINA_BASE/conf/ where $CATALINA_BASE is the directory in which you installed Tomcat.
  2. In server.xml, find a statement similar to the following:

    <Connector port="8443" maxHttpHeaderSize="8192"
       maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
       enableLookups="false" redirectPort="8080" acceptCount="100"
       connectionTimeout="20000" disableUploadTimeout="true" />

    or

    <Connector port="8443" protocol="HTTP/1.1"
       connectionTimeout="20000"
       redirectPort="8080" />
  3. Change the Connector port=”8443″ port to any other port number.

    For example:

    <Connector port="8181" protocol="HTTP/1.1"
       connectionTimeout="20000" 
       redirectPort="8080" />
    
  4. Save the server.xml file and restart the Tomcat server.

Note: To use encrypted parameters on the Tomcat server, for example, an encrypted port number in the server.xml file, see Configure to Use Encrypted Parameters on the Tomcat Server.