I want to have tomcat put different webapps to different folders on my server.
Reason is: I am using (test phase) different virtual hosts and therefore I want to seperate the access to them, too.
Lets say:
vhost1.mydomain.com accesses locally at /home/vhost1/webapps/app1
vhost2.mydomain.com accesses locally at /home/vhost2/webapps/app2
BTW: I am only concerned about the deployed path, the war file could stay where ever tomcat wants to have it.
This is because I want to let different users access my deployed content, but not all tomcat webapps.
I’m not sure about having the deployed path separate from the war file, but you can certainly have different deployment locations for different URLs.
Edit the (tomcat home)/conf/server.xml
Find the <host> element:
name should be changed to the URL, e.g. vhost1.mydomain.com
appBase can be an absolute path on your filesystem where it will look for WAR files to deploy
You can have multiple <host> entries, all with different name and appBase.