Hi,
I am using tomcat 5.5.20 version. I am trying to deploy multiple sites
using tomcat (without apache). Ideally I would like to define Hosts in
server.xml and define context.xml outside server.xml.
<tomcat>/webapps/host1 is the webapps directory for host1
<tomcat>/webapps/host2 is the webapps directory for host2
server.xml has following hosts
www.host1.mycompany.com
www.host2.mycompany.com
<Host
name="www.host1.mycompany.com"
appBase="webapps/host1"
unpackWARs="true"
autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">
<Valve className='org.apache.catalina.valves.AccessLogValve'
directory='logs/host1'
prefix='host1_access_log'
suffix='.log'
pattern='common' />
</Host>
<Host
name="www.host2.mycompany.com"
appBase="webapps/host2"
unpackWARs="true"
autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">
<Valve className='org.apache.catalina.valves.AccessLogValve'
directory='logs/host2'
prefix='host2_access_log'
suffix='.log'
pattern='common' />
</Host>
And in each context.xml is defined as follows at webapps/host1/META-
INF/context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Context debug="5" path="" reloadable="true" />
This configuration does not work. Please let me know if I am doing
anything wrong.
Please advise.
Arne Vajhøj - 21 Jul 2007 21:32 GMT
> I am using tomcat 5.5.20 version. I am trying to deploy multiple sites
> using tomcat (without apache). Ideally I would like to define Hosts in
> server.xml and define context.xml outside server.xml.
...
> This configuration does not work. Please let me know if I am doing
> anything wrong.
>
> Please advise.
I advise you to explain what "does not work" means.
Arne