I am running 5.5 as well.
Would the path to the ROOT.xml be $CATALINA_HOME/conf/Catalina/riz or $CATALINA_HOME/conf/Catalina/www.riz.com
(based on the OP)

The filename under conf/[Engine]/[host] should be ROOT.xml, right?

Tim Lucia wrote:
The link/text you posted says "except when statically defining a Context in
server.xml", which was the case in the example from the OP...  The above
statement is exactly opposite of what you posted, is it not?  To my
recollection, and despite the fact that it is (now) frowned upon,
path="/something" has always worked in server.xml... since my days with
Tomcat 3.x.

Tim


-----Original Message-----
From: Parsons Technical Services [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 7:57 AM
To: Tomcat Users List
Subject: Re: More virtual hosting problems!!

From  http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

And look at the path element.

" The value of this field must not be set except when statically defining a Context in server.xml, as it will be inferred from the filenames used for either the .xml context file or the docBase. "

Now there is the issue of Tomcat version. What version is running?

I was basing my info on an assumption of a 5.5.x path.

The 5.0.x path is different.

Doug


----- Original Message ----- From: "Tim Lucia" <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" <users@tomcat.apache.org>
Sent: Friday, May 12, 2006 6:48 AM
Subject: RE: More virtual hosting problems!!


Where is this documented?  I have had no problem doing this.  Since I now
put context files in conf/[Engine]/[Host], I went back and added

<Context
 docBase="d:/tjl/Projects/log4jconfig"
 path="/log4jconfig"/>

to my server.xml and http://localhost:8080/manager/list shows

OK - Listed applications for virtual host localhost
/admin:running:0:C:/Tomcat/server/webapps/admin
/host-manager:running:0:C:/Tomcat/server/webapps/host-manager
/log4jconfig:running:0:D:/tjl/Projects/Log4JConfig
/:running:0:ROOT
/manager:running:0:C:/Tomcat/server/webapps/manager

So I was able to put a path in the context and it was respected.

Tim


-----Original Message-----
From: Parsons Technical Services [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 11, 2006 11:12 PM
To: Tomcat Users List
Subject: Re: More virtual hosting problems!!

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]


---------------------------------------------------------------------
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]




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

Reply via email to