How to configure Tomcat (offline, without Apache [*]) so that I can deploy it on the same server and serve two different web applications, depending on the domain name I requested?
What is gotchas at the same time? Can you have SSL on both domains? If anyone here really did, I would be interested to answer these questions, as well as as many reviews as possible ...
I found a blog post describing such a setup, but for Tomcat 5.5:
<Engine defaultHost="domain1.com" name="Catalina"> <Host name="domain1.com" appBase="/home/user1/domain1"> <Alias>www.domain1.com</Alias> <Context path="" docBase="."/> </Host> <Host name="domain2.com" appBase="/home/user1/domain2"> <Alias>www.domain2.com</Alias> <Context path="" docBase="."/> </Host>
http://iam-rakesh.blogspot.com/2009/10/hosting-multiple-domains-in-tomcat.html
Also, at the moment I have one webapp, ROOT.war, inside ... / tomcat / webapps /
How will this work when I have two βrootsβ, one root webapp for domain1.com and one root webapp for domain2.com? Where will the .war be located?
source share