One issue is that the path element can only be set to "" when you use it in the server.xml.

Doug

----- Original Message ----- From: "Rizwan Merchant" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, May 11, 2006 1:37 PM
Subject: Re: More virtual hosting problems!!



I got this working now by moving the Context definition from the ROOT.xml to the server.xml under the <Host> tag as follows

<Host name="www.riz.com" appBase="webapps/riz" unpackWARs="true" autoDeploy="true"
      xmlValidation="false" xmlNamespaceAware="false">
          <Context displayName="riz" docBase="" path=""
              workDir="work/Catalina/riz/_">
        </Context>
     </Host>

I got rid of the www.riz.com directory under $CATALINA_HOME/conf/Catalina

But I did read somewhere that it is not recommended to put the Context definition in the server.xml file.

Can someone please explain why the first scenario did not work and the above does, although it is not recommded.

Thanks,
-Riz.

Rizwan Merchant wrote:

Hi all!

I have been following the mailing list and it seems this is a common problem amongst many users. But I could not find a solution to my problem, hence this post. Hope someone can help me.

I am trying to set up a simple virtual host for the domain www.riz.com on tomcat (listening on port 80) using the instructions provided at http://ex-parrot.com/~pete/tomcat-vhost.html

Based on the instructions here is what I have done..

1. Added the following to server.xml which is under under $CATALINA_HOME/conf <Host name="www.riz.com" appBase="webapps/riz" unpackWARs="true" autoDeploy="true"
      xmlValidation="false" xmlNamespaceAware="false">
     </Host>

There is a riz.war file under $CATALINA_HOME/webapps that gets expanded on deployment.

2. Created a directory $CATALINA_HOME/conf/Catalina/www.riz.com
   Added ROOT.xml to this directory which contains
     <?xml version='1.0' encoding='utf-8'?>
   <Context displayName="riz" docBase="" path=""
   workDir="work/Catalina/riz/_">
   </Context>


Note that I have mapped www.riz.com to 127.0.0.1 in the "hosts" file under c:\windows\system32\drivers\etc so that when i type www.riz.com in the browser it will resolve to localhost.

Please can someone tell me what I am doing wrong, or if I am missing anything?

Thanks,
-Riz.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to