Hello friends,

I would like to deploy multiple webapps(as of now 2,waiting for domain name
for 3rd) on a single Apache Tomcat instance. I have been partially
successful as one URL is working properly, other is not.

Situation :
1) I have created two folders called domain1_webapps  and domain2_webapps
and put the respective webapps named ROOT.war in each of them.
2) Then I configured server.xml as mentioned below.


 <Host name="localhost"  appBase="webapps" unpackWARs="true"
autoDeploy="true"/>
        <Host name="www.domain-one.com" autoDeploy="true" unpackWARs="true"
appBase="domain1_webapps"/>
        <Host name="www.domain-two.com" autoDeploy="true" unpackWARs="true"
appBase="domain2_webapps"/>

Right now when I call www.domain-one.com( not domain-one.com), I get the
correct site. But for the 2nd one, I have to call
www.domain-two.com/app_name.

*How can I remove in 2nd domain the app_name context-path which is getting
appended. Kindly let me know. *

The ironical situation is I have not kept the app_name anywhere, guess
Tomcat must be retrieving it from POM.xml.

Reference question on SO :
http://stackoverflow.com/questions/34069289/apache-tomcat-url-based-redirection-partially-works

Regards,
Kernel

Reply via email to