tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hassan Schroeder <>
Subject Re: Troubleshooting Virtual Hosts with Tomcat 5 standalone mode...
Date Tue, 05 Apr 2005 00:01:14 GMT
Jeff Duska wrote:
> I'm trying to setup a couple of virtual hosts using Tomcat in stand
> alone mode.

> I started with the goal of having a user directory for each virtual
> host. For example, for the sample the appbase would be
> /home/domain/webapps.
> I setup my server.xml file to have the following host settings
>    <Host name="" debug="0" appBase="/home/domain/webapps"
>        unpackWARs="true" autoDeploy="true"
>        xmlValidation="false" xmlNamespaceAware="false">
>         <Context path="" docBase="."/>
>     </host>

OK, don't do that :-)

Don't put the Context elements in server.xml. Put your Host elements
there, e.g.

    <Host name="oahu"  appBase="/www/oahu"></Host>
    <Host name="maui"  appBase="/www/maui"></Host>	   	
    <Host name="kauai" appBase="/www/kauai"></Host>	   	  		

Then (assuming you're using the default Engine name) make directories

In each of those put your Context files, as in
    <!-- the above if you want the manager app available -->
    <!-- etc... -->

which will look (minimally!) like

    <Context docBase="/www/oahu/ROOT">
	<!-- define Resources, etc. -->	

That's it. Restart tomcat. Done. See, wasn't that easy? :-)

Hassan Schroeder -----------------------------
Webtuitive Design ===  (+1) 408-938-0567   ===

                           dream.  code.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message