tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: Tomcat+apache on name_based virtual hosts
Date Wed, 03 Mar 2010 18:17:47 GMT
> From: Jordan Michaels [mailto:jordan@viviotech.net]
> Subject: Re: Tomcat+apache on name_based virtual hosts
> 
> You can do this by creating new <Host> and <Context> entries in the
> server.xml file for each site.

Please don't suggest putting <Context> elements in server.xml; that's ancient, dismal
practice.  Place the <Context> elements in conf/Catalina/[host]/ROOT.xml, with a docBase
attribute pointing to the location of the .war file or directory.

>          <Host name="a.university.com" appBase="webapps"
>               unpackWARs="true" autoDeploy="true"
>               xmlValidation="false" xmlNamespaceAware="false">
>               <Context path="" docBase="[PATH TO WEBAPP]" />
>          </Host>
>          <Host name="b.university.com" appBase="webapps"
>               unpackWARs="true" autoDeploy="true"
>               xmlValidation="false" xmlNamespaceAware="false">
>               <Context path="" docBase="[PATH TO WEBAPP]" />
>          </Host>

Having the same appBase for multiple <Host> elements is asking for trouble, since the
two hosts will scribble on top of each other.

 - 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message