Can I do true virtual hosts using Tomcat, or are separate Tomcat installations needed?

Alessandro A. Garbagnati

There are two different ways to achieve this.
The first one is using one single Tomcat 3.2.x instance. Since version 3.2, in fact, Tomcat supports the virtual domain. In the documentation there is a simple example for how to achieve this.
The second solution is using two different instances, on different ports, and with different 'tomcat home', because the 'work' directory has to be unique per instance.

The downsize of the second solution it's obviously, more memory used because of the two different virtual machines.
The downsize of the first solution is that if you need to restart one single 'domain', you will restart all of them.
I personally prefer the second solution, more control, more indipendence... but there are many people that can probably argue this.