Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running two tomcat on a single port

Any one have an idea to share running multiple tomcats on single machine with same port 8080

like image 560
Alzzz Avatar asked Mar 21 '12 04:03

Alzzz


People also ask

Can I run two Tomcats on the same machine?

Yes its possible. I had installed tomcat 7 and tomcat 8 on my linux VM. You just need to make sure that the port numbers for the two tomcat instances are different. Change the Connector port=”8080″ port to any other port number.

How many JVM instances does a Tomcat server have?

In a section that shortly explains the architecture of the container he says: "Only one tomcat instance can live in a single Java Virtual Machine(JVM)..." later, the author states: "You can still run multiple instances on same physical box, but as separated Java processes..." What is actually the meaning of running the ...


2 Answers

One way would be to set up a single web server (such as Apache, but your choice) on port 8080, which forwards requests based on URL to the appropriate Tomcat instance running on a different port, such as 8081 or 8082.

like image 136
Greg Hewgill Avatar answered Oct 16 '22 16:10

Greg Hewgill


AFAIK, you can not run two different web servers at same port.

like image 29
Lucifer Avatar answered Oct 16 '22 15:10

Lucifer