Yes but i have multiple vhost for different webapps.
I have try to put <Host name="vhost1.mydomain.com" debug="0"
appBase="/usr/local/tomcat/webapps/" like you suggest but when i launch
tomcat it seem that i only get the ROOT webapps, and how can the server know
that vhost1.mydomain.com is for /usr/local/tomcat/webapps/myaccount for
exemple
and vhost2.mydomain.com to myaccount2 if i only write appbase to where my
webapps are deployed?
Ok for the path and docBase so the context.xml is somethink like :
<Context reloadable=true /> only ?
the defaultHost attribute is default.mydomain.com only.
I have read the
http://marc.theaimsgroup.com/?l=tomcat-user&m=116198740004759&w=2 and i have
deploy a default website in ROOT (with a META-INF/context.xml) but none of
my websites work.
So i have in the server.xml :
<Engine name="Catalina" defaultHost="default.mydomain.com">
<Host name="vhost1.mydomain.com" debug="0"
appBase="/usr/local/tomcat/webapps/"
unpackWARs="true" autoDeploy="true">
</Host>
<Host name="vhost2.mydomain.com" debug="0"
appBase="/usr/local/tomcat/webapps/"
unpackWARs="true" autoDeploy="true">
</Host>
and in /usr/local/tomcat/webapps/ROOT/META-INF/context.xml
/usr/local/tomcat/webapps/myaccount1//META-INF/context.xml
/usr/local/tomcat/webapps/myaccount2//META-INF/context.xml
<Context reloadable="true" />
<WatchedResource>WEB-INF/web.xml</WatchedResource> (taken from internet don
t know if it s necessary)
And nothing works , for default.mydomain.com i get : HTTP/1.1 400 No Host
matches server name default.mydomain.com
for vhost1.mydomain.com i get only a 404 error
What i am doing wrong ? and in this configuration how can the server know
that vhost2 is for myaccount2 and vhost1 for myaccount1 for example ?
thanks for your help
----- Original Message -----
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, October 29, 2006 4:27 PM
Subject: RE: problem with getcontext and context.xml
From: BRUN Sébastien [mailto:[EMAIL PROTECTED]
Subject: Fw: problem with getcontext and context.xml
i would like to setup a virtual host on tomcat
If you only have one host to worry about, you don't need to use virtual
hosts. You can also use the alias attribute if you have multiple domains to
support with identical apps.
<Host name="vhost1.mydomain.com" debug="0"
appBase="/usr/local/tomcat/webapps/myaccount/"
The above is incorrect. The appBase parameter should point to the directory
in which your webapps are deployed, not to a specific webapp.
/usr/local/tomcat/webapps/myaccount/META-INF/context.xml :
<Context path="" docBase="" override="true">
</Context>
When the <Context> element is in META-INF/context.xml, the path and docBase
attributes must not be used, since they are derivable from the location of
the app. If you want "myaccount" to be the default webapp for the <Host>,
change its name (subdirectory) to ROOT (case sensitive). Read some of this
weekend's messages for more detail, especially this one:
http://marc.theaimsgroup.com/?l=tomcat-user&m=116198740004759&w=2
Alert!: HTTP/1.1 400 No Host matches server name vhost1.mydomain.com
What is the defaultHost attribute set to in your <Engine>?
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]