Wednesday 25 July 2012

Running multiple instances of Tomcat on different ports on same server

I wanted to run two instances of Tomcat on different ports on my
workstation, and this is what I did.

Modify these values in /[TOMCAT INSTALL DIRECTORY]/conf/server.xml.

In this example we are using "7" to replace the "8" in the port numbers

ie, 2nd tomcat to run on port 7070 instead of 8080, shutdown port is
7005, AJP connector port is 7009


<!-- DEFAULT VALUE: 8005 -->
<Server port="7005" shutdown="SHUTDOWN">

<!-- DEFAULT VALUE: 8080 -->
<Connector port="7070" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8" />


<!-- Define an AJP 1.3 Connector on port 8009 -->
<!-- DEFAULT VALUE: 8009 -->
<Connector port="7009" protocol="AJP/1.3" redirectPort="8443"
URIEncoding="UTF-8" />

No comments: