How to configure two apache tomcat instances in the same machine both Windows and Linux ?
Introduction:
In this article, we will explore How to configure two apache tomcat instances in the same machine both Windows and Linux?
Configuring Tomcat port
By default tomcat binding ports are 8005, 8080 and 8009.
If you have another tomcat instance running on same server or other application like JBoss Application Server, these ports are likely already used. In this case you should change the default ports.
Change tomcat ports
The port change must be done with the tomcat application stopped.
Edit $TOMCAT_Home/config/server.xml and check all Tomcat port properties.
Shut-down 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.
Hope this article helps !!
Thanks for reading this article ! ! please leave your comments and suggestion about this article.
No comments