Since no one has tackled this yet, I will give you my take on it.
I think that you have an issue in using the same domain name on the virtual
host.
What you may want to do is try it with two different domain names.
test1.myserver1.com
test2.myserver2.com
See if you get the same results.
If yes, then I suspect an issue with your config as this setup is used by
quite a few folks.
If no, then you may have run across something that Tomcat doesn't do.
Weather or not it is a bug I will not say because I am not familiar enough
with the spec to make that call.
What may work is to setup two dummy domains www.localhost1.com and
www.localhost2.com and then use the alias attribute in the Host element to
repoint the test1.mydomain.com to www.localhost1.com and so on.
Doug
----- Original Message -----
From: "Vamsidhar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, March 24, 2006 12:07 PM
Subject: Tomcat 5.5.16 Virtual Hosting Bug ?
Hi all:
This is third time I am posting the same question. I tried everything I
could, including re-installing Tomcat from scratch. But, the problem still
remains. Please help !!
I am using Tomcat 5.5.16 (stand-alone) with JDK 5.0 on Windows XP and trying
to setup virtual hosting (to start with two test hosts + localhost). There
is a single ROOT context for each of my test hosts test1.mymachine.com and
test2.mymachine.com as shown below. The root context is defined in a file
named ROOT.xml which is present in
$CATALINA_HOME/conf/[engine_name]/test1.mymachine.com/ROOT.xml
$CATALINA_HOME/conf/[engine_name]/test2.mymachine.com/ROOT.xml
Once I start the tomcat server, three host folders are being created inside
the work directory. As expected the localhost host has all the webapps that
come with tomcat 5.5.16 installation like examples, etc. The work directory
also has two other host folders test1.mymachine.com and test2.mymachine.com.
PROBLEM:
In test1.mymachine.com and test2.mymachine.com along with the root context
all folders present in $CATALINA_HOME are being deployed as contexts. I can
see folders being created in work directory of test1 and test2 which are
exaclty the foldes present in $CATALINA_HOME
Is this is BUG in tomcat 5.5.16 or is there something wrong with my setup.
Any help is appreciated.
Thanks in advance.
ROOT.xml file for test1.mymachine.com
<Context path="" docBase="c:\websites\test1\webapps\test1"
debug="5" reloadable="true" crossContext="true">
....DB resources
</Context>
ROOT.xml file test2.mymachine.com
<Context path="" docBase="c:\websites\test2\webapps\test2"
debug="5" reloadable="true" crossContext="true">
....DB resources
</Context>
Following is the engine tag of my server.xml file
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm "
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
<Host name="test1.mymachine.com" debug="0"
appbase="c:\websites\test1\webapps"
unpackWARs="true">
<Alias>"test1.mymachine.com"</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="c:\websites\test1\webapps\logs"
prefix="test1_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="c:\websites\test1\webapps\logs"
prefix="test1_catalina_log." suffix=".txt"
timestamp="true"/>
</Host>
<Host name="test2.mymachine.com" debug="0"
appbase="c:\websites\test2\webapps"
unpackWARs="true">
<Alias>"test2.mymachine.com"</Alias>
<Valve className=" org.apache.catalina.valves.AccessLogValve"
directory="c:\websites\test2\webapps\logs"
prefix="test2_access_log." suffix=".txt"
pattern="common" resolveHosts="false"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="c:\websites\test2\webapps\logs"
prefix="test2_catalina_log." suffix=".txt"
timestamp="true"/>
</Host>
</Engine>
Vamsi.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]