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: Problem setting server.xml <host> <context> field.
Date Thu, 04 Jan 2007 03:18:51 GMT
> From: Jacob Rhoden [mailto:jacob@rhoden.id.au] 
> Subject: Problem setting server.xml <host> <context> field.
> 
> I have setup a second <host> entry, to enable mapping of a particuar 
> application to a virtual host in apache (via mod_jk2).

You do know that mod_jk2 has been deprecated for almost two years?
Pretty much all the useful stuff has been implemented in mod_jk in the
interim.

> The following seems to work ok, except or a possible bug:
>       <Host name="fish.org" appBase="webapps" unpackWARs="true">
>         <Logger className="org.apache.catalina.logger.FileLogger"
>                  directory="logs"  prefix="virtual_log." 
> suffix=".txt" timestamp="true"/>
>         <Context path="" docBase="/usr/local/tomcat/webapps/FishApp" 
> debug="0" reloadable="true"/>
>       </Host>

You probably don't want the two <Host> entries to use the same appBase,
unless you really want the apps deployed in both of them at the same
time.  You don't say what level of Tomcat you're using, but with current
versions (5.0 and beyond), the above will get the app deployed twice
under fish.org, once as the default, once as FishApp.  The doc for
current levels also recommends quite strongly against putting <Context>
elements inside server.xml.

> However if i undeploy/redeploy the application within the 
> tomcat manager, it no longer works.

You need to have a separate manager app for each <Host>.  In current
levels, this would be accomplished by putting a manager.xml file in
conf/Catalina/fish.org as well as the usual conf/Catalina/localhost.
However, unless the overlap of the deployment directories of the two
<Host>s is straightened out, I suspect it will never work reliably.

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


Mime
View raw message