DanielSwan
MIS
I've encountered a problem with my current setup, and am seeking input as to a solution.
Here is an overview of our setup, our problem, and an interim but imperfect solution we are using.
The setup: Tomcat, and apache using virtual hosts. The two virtual hosts are Dev and Test environments.
The problem: The application is named the same in both dev and test environments, meaning whichever virutal host one goes to, they're going to end up at the same application. Example: Application "UserManager".
The problem is, that Tomcat is told to load application "UserManager", and directs to the exact same application, regardless of which Virtual host the request is coming from. It would be nice if somehow Tomcat could discern which Virtual host the request is coming from and direct accordingly.
Our workaround:
In the virtual host used for development, we've included a line to rewrite the URL from to The war is named UserManagerDEV. It works, and allows us to direct to the appropriate WAR depending on which virutal host, but I would prefer a less kludgy situation.
Is there a way to get Tomcat to direct to a separate directory hierarchy, depending on the Virtual host used?
Is it possible/preferable to run two completely separate instances of Tomcat?
Is there another solution?
Any help appreciated,
Dan.
Here is an overview of our setup, our problem, and an interim but imperfect solution we are using.
The setup: Tomcat, and apache using virtual hosts. The two virtual hosts are Dev and Test environments.
The problem: The application is named the same in both dev and test environments, meaning whichever virutal host one goes to, they're going to end up at the same application. Example: Application "UserManager".
The problem is, that Tomcat is told to load application "UserManager", and directs to the exact same application, regardless of which Virtual host the request is coming from. It would be nice if somehow Tomcat could discern which Virtual host the request is coming from and direct accordingly.
Our workaround:
In the virtual host used for development, we've included a line to rewrite the URL from to The war is named UserManagerDEV. It works, and allows us to direct to the appropriate WAR depending on which virutal host, but I would prefer a less kludgy situation.
Is there a way to get Tomcat to direct to a separate directory hierarchy, depending on the Virtual host used?
Is it possible/preferable to run two completely separate instances of Tomcat?
Is there another solution?
Any help appreciated,
Dan.