Ok so from a clean tomcat install in my user folder on windows 7 ultimate
service pack 1.
Step 1) Go to http://www.whatismyip.com/ and determine my ip address on the
host machine I am running tomcat.
Step 2) Go to my domains at http://godaddy.com , log in, click on my
account, expand domains, click launch, click manage, click on the (A) host
line and change the ip address to the value found in step 1.
Step 3) Repeat step 2 for the second website. (Wait an hour for the name
servers to pick up the new ip address)
Step 4) Open the servers.xml in the conf folder of the tomcat install.
Find and replace 8080 with 80 and 8443 with 443.
Step 5) Go to my router and verify that port 80 and port 443 are being
hosted by the server where tomcat is installed. (router specific)
Step 6) Go to the control panel, system and security, allow a program
through windows firewall, browse to the tomcat service runner. Verify that
commons daemon service runner is in my windows program firewall exception
list. (Both public and private checked)
Step 7) Modify tomcat-users.xml in the conf folder. Uncomment the
security lines. Add
<user username="something" password="somethingsecret"
Step 8) Start up tomcat at the windows command line run as administrator.
In the bin directory run startup.bat
Step 9) Verify that I get the tomcat installation page when I go to either
Step 9) Shut down tomcat by running shutdown.bat in the bin directory of
the tomcat installation
Step 10) Add the following lines in the server.xml right after localhost
<Host name="websiteb.org" appBase="websiteb"
Step 11) Create directories websitea and websiteb in the same directory as
Step 12) Create a ROOT.war file in eclipse by creating a dynamic website
project. Drop html file in the WebContent folder of the site named
index.html. Then right click on the project in eclipse, select Export
select WAR file. Save as ROOT.war file at tomcat directory websitea
Step 13) Create a ROOT.war file in eclipse for the second site with a
different index.html the same way. Save as ROOT.war at tomcat directory
Step 14) remove the ROOT folder in webapps. Put websitea.com ROOT.war
file in webapps. (Experimenting here...)
Step 14) Startup Tomcat by running startup.bat.
Here is the strange behavior that has me puzzled.
When I enter www.websitea.com or www.websiteb.org in the browser it takes
me to the site ROOT.war in webapps
When I enter exactly websitea.com or websiteb.org it takes me to the
> As with Kerry, I have also done it as the blog says. More information
> would be helpful.
> Ultimately, I went with Apache and the Tomcat/JK connector. This allowed
> us to not only host multiple domains with a single Tomcat instance, but
> also allows us to easily integrate other server-side architecture such as
> Python, PHP, etc. (Yes...some of these could be substituted within the JVM,
> but we chose not to for a number of reasons 5+ years ago)
> On 4/5/12 8:51 PM, Kerry Wilson wrote:
> I have done that before exactly as the blog says. What is the behavior
> you are seeing? Perhaps you could let apache handle the virtual hosting and
> run two tomcat instances.
> Sent from Phonezilla, my Samsung Galaxy Note
> -------- Original message --------
> Subject: [ajug-members] Running multiple sites off of a single tomcat
> From: Bryan Pauquette <bryan.pauquette@gmai...><bryan.pauquette@gmai...>
> To: ajug-members@ajug... > CC: [ajug-members] Running multiple sites off of a single tomcat server
> Hey has anyone been able to run multiple sites (domains) off a single
> tomcat server?
> I found some somewhat useful links and I have been experimenting with
> but the behavior I am experiencing does not match what I expect.
> http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html >
> http://iam-rakesh.blogspot.com/2009/10/hosting-multiple-domains-in-tomcat.html >
> I am running tomcat 6.0.35. So far I have updated server.xml and
> two host entries and put a ROOT.war
> at the location I defined in appbase
> Anyone do this before?
> I have been wasting my time on this rabbit-hole.....
> ajug-members mailing email@example.com://www.ajug.org/mailman/listinfo/ajug-members >
> ajug-members mailing list
> ajug-members@ajug... > http://www.ajug.org/mailman/listinfo/ajug-members >