Hi James,
On Linux, I've accomplished this using the following configuration:
+-------- snip from server.xml on linux --------+
<Host name="domain1" debug="0" appBase="webapps/app1"
unpackWARs="true" autoDeploy="true">
</Host>
<Host name="domain2" debug="0" appBase="webapps/app2"
unpackWARs="true" autoDeploy="true">
</Host>
+-------- snip from server.xml on linux --------+
On Windows, try this:
+-------- snip from server.xml on windows --------+
<Host name="domain1" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="/app1" debug="1"/>
</Host>
<Host name="domain2" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="/app2" debug="1"/>
</Host>
+-------- snip from server.xml on windows --------+
I don't know why it acts differently on windows and linux...
Also, I've noticed that the windows setup seems to create two instances of
each app when viewed in the manager. One as "/" and one as "app1" or "app2"
(depending on which domain you log into). So this should get you started
but I wouldn't use the windows setup for production. Linux you should be
good to go.
HTH,
Adrian Lanning
----- Original Message -----
From: "James Agnew" <[EMAIL PROTECTED]>
To: "tomcat list" <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 5:24 AM
Subject: several virtual hosts --> single application
> Hello
>
> Is it possible to have several virtual hosts point to different folders
> within the same context under tomcat 5 standalone webserver?
>
> <Host name="domain1.com" debug="0" appBase="webapps">
> <Context path="" docBase="domain1" debug="0" reloadable="true"/>
> </Host>
>
> <Host name="domain2.com" debug="0" appBase="webapps">
> <Context path="" docBase="domain2" debug="0" reloadable="true"/>
> </Host>
>
> http://domain1.com --> myapps/domain1
> http://domain2.com --> myapps/domain2
>
> so that one application handles all the requests? I'm running Cold Fusion
as
> the application and I need it to handle request for virtual hosts within
its
> own context i.e. domain1 and domain2.
>
> I can achieve this easily with <VirtualHost> directive in Apache, but
can't
> get it to work under Tomcat standalone. Is it possible?
>
> Any help much appreciated.
>
> James
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]