tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Schönhaber <>
Subject Re: HOW TO install/setup 2 instances of tomcat on same server
Date Wed, 20 Aug 2008 23:50:53 GMT
André Warnier wrote:

>> edponce wrote:

>>> depending on the needs of the problem. I need to have 2 instances of 
>>> tomcat
>>> on the same server for the same application. One would be for 
>>> production and
>>> the other for development (which can be start and stopped whenever 
>>> without
>>> affecting the production one).

> You do not necessarily need two separate instances of Tomcat.
> Under Tomcat, each application can be started and stopped (and even a 
> new version reloaded) without stopping the Tomcat server.
> You would just need to "name" your applications differently.
> (like "" and 
> "").

Yes, that's possible.

> There also exists the possibility to run one Tomcat with different 
> "Virtual Hosts", on the same port 80.
> Each one of these virtual hosts would have a different "DNS name" (like 
>   "" and "") and could 
> have a different directory where the applications reside, but the 
> application itself would be named the same way.

Yes, that's also possible.

> I am mentioning the above two possibilities because, you knowing not 
> much about Tomcat to start witj, either one of the above is probably 
> easier to set up than two separate Tomcat instances.

I don't see what's difficult with creating two separate Tomcats. Just 
unpack the Tomcat archive two times to different directories[1] and 
change the ports used in one of them so that they are unique. Looking at 
the default server.xml, there are three numbers to be changed (YMMV if 
you add/remove Connectors).

> The difference between the above solutions and two really separate 
> Tomcat instances would be if the test application could really crash the 
> whole server, in which case you may not like one of the above solutions.

Furthermore, if I understand the OP's statement above correctly, he 
wants to be able to restart the development Tomcat without affecting the 
production Tomcat. That's not possible with either of those two solutions.

> Comments anyone ?

No matter which possibilities exist to set up multiple Tomcat instances 
on a single machine, I would *never* use a production server for 
development. If I was in the OP's shoes, I'd rethink this requirement 
(if it indeed is one).


[1] Of course, one can create multiple Tomcat instances from a single 
binary by using multiple different CATALINA_BASEs. But that might be 
unnecessary complex in this case.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message