Configuring Tomcat ports

By default, the Tomcat binding ports are 8005, 8080, and 8009.

If you have another Tomcat running on the same server, or another application like JBoss Application Server, these ports may already be in use. In this case, you should change the default ports.

Change Tomcat ports

The port change must be made while the Tomcat application is stopped.

Edit $TOMCAT_HOME/conf/server.xml and look for all Tomcat port properties.

ServiceDefault portExample of new port

Shutdown Port

 

8005

8105

Change

<Server port="8005" shutdown="SHUTDOWN">

to

<Server port="8105" shutdown="SHUTDOWN">

Tomcat Connector Port

 

8080

8180

Change

<Connector address="0.0.0.0" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

to

<Connector address="0.0.0.0" connectionTimeout="20000" port="8180" protocol="HTTP/1.1" redirectPort="8443"/>

AJP Connector Port

 

8009

8109

Change

<Connector address="127.0.0.1" port="8009" protocol="AJP/1.3" redirectPort="8443"/>

to

<Connector address="127.0.0.1" port="8109" protocol="AJP/1.3" redirectPort="8443"/>

To shut down the different instances, execute the shutdown.sh script from each $TOMCAT_HOME/bin.

 

Table of contents [ Hide Show ]