I have about 6 or 7 webapps which are configured to be deployed as the root app on Tomcat (6). So, each app can be later accessed by http://host:8080/
I have to deploy these webapps in one computer for a QA environment. The team commented about using one instance of Tomcat, and deploy each webapp on a different port, so they would still be deployed as the root application.
Any suggestions as to how to do this and what the best approach is?
You need to look into virtual hosts.
A regular host lookup of the root context is something like
http://www.mymachine.com:8080/, when you want to put two applications at that same context, Tomcat can’t do it because it doesn’t know which application should respond to such a lookup. Normally Tomcat resolves these conflicts by promoting the placement of different apps in an “application” path, like soHowever with virtual hosts, one configures a single web server to respond to multiple host name lookups. With such a configuration, the hostname can then be used as the differentiator.
Note that such a configuration requires that you do the extra work of making sure that DNS knows both hostnames and maps them both back to the same Tomcat server. Then Tomcat (or Apache if running an Apache server in front of your Tomcat server) must be configured to map the request by it’s hostname and application path to a webapp instead of just mapping by the application path to a webapp.
Here is the documentation on how to do this in Tomcat 6.0. Note that this doesn’t apply to the necessary networking work you’ll need to do to get both hostnames to resolve to the same machine. Good luck!