Can anyone please advise me on the following.
I have set Tomcat up on my PC with two different folders containing two
different web applications using port 80.
I can access them thus :- http://localhost/A/index.htm and
http://localhost/B/index.htm
If my PC is connected to the internet with a static ip address of say
123.123.84.84 and I have rented two different domain names say mynameA.com
and mynameB.com, how do I set Tomcat up so that the domain names relate to
folders A and B.
For example so that 123.123.84.84/A = mynameA.com and 123.123.84.84/B =
mynameB.com.
The objective is to access the two different web applications using the
relevant domain names on Tomcat.
Is this possible and how can it be set up? Or can you please direct me to a
book which explains how this can be achieved.
Thanks in advance.
Kevin
derek - 27 Nov 2007 20:49 GMT
> Can anyone please advise me on the following.
> I have set Tomcat up on my PC with two different folders containing two
[quoted text clipped - 13 lines]
> Thanks in advance.
> Kevin
Do a search on the Host tag.
Its in the server.xml file.
<Host name="local.programmersbible.com" appBase="pb" unpackWars="false" autoDeploy="false"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="">
</Context>
</Host>
Also, tomcat docs talk about it.
http://tomcat.apache.org/tomcat-5.5-doc/config/host.html