I think you should have a look into Tomcat User's guide, "Configuring Virtual
Hosting" section, as it explains how this is done. I'm not 100% any more if
virtual hosting has been improved in any way in the 3.2.x series over what't
described in the manual, but I can tell you for sure that 3.3.x series has
excellent virtual hosting support (i.e. I recommend it). The preferred way is to
have separate configuration files for different vitual hosts/applications.
For instance, this file (which has to be named apps-*.xml)
----------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>
<Host name="www.somehost.domain" >
<Context path="/" docBase="/var/www/html/somehost.domain" />
</Host>
</Server>
----------------------------------------------
configures one such virual host/application pair in Tomcat 3.3.x. One can,
obviously, configure more then one context.
Your Apache configuration would have to match. For instance:
----------------------------------------------
<VirtualHost 1.2.3.4:80>
# General setup for the virtual host
DocumentRoot "/var/www/html/somehost.domain"
ServerName www.somehost.domain
ServerAdmin [EMAIL PROTECTED]
</VirtualHost>
----------------------------------------------
This is, of course, if you mix static files with Tomcat files (I use Velocity
templates, which I also recommend :-) in the same directory. Otherwise, they can
be located in totally different places.
Bojan
Quoting Micael Padraig Og mac Grene <[EMAIL PROTECTED]>:
> Thanks, Bill. However, I looked at the documentation. What makes you
>
> think that solves this problem? I am not saying you are wrong, but I
> don't
> see how that does it.
>
> Micael
>
> At 03:44 PM 2/3/02 -0800, you wrote:
> >This is largely what NameVitualHost(s) are for in Apache. See:
> >http://httpd.apache.org/docs/mod/core.html#namevirtualhost
> >----- Original Message -----
> >From: "Micael Padraig Og mac Grene" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Sunday, February 03, 2002 8:25 AM
> >Subject: Multiple URLs/Single IP
> >
> >
> > > How can I map multiple URLs, e.g. www.aa.com and www.bb.com, which
> are
> > > pointed to a single IP address, e.g. 210.34.247.21, to multiple
> web
> > > applications, e.g. webapps/aa and webapps/bb? Many thanks for any
> help.
> >I
> > > have had a solution offered with a Layer-7 Switch and a squid proxy,
> but I
> > > would prefer either Apache or Tomcat solutions by far. I see
> nothing in
> > > the documentation or in the lists. I know how to do this with a
> context
> > > manager for JBoss and Tomcat 3.2.4, but I am moving to SOAP as my
> solution
> > > of choice with the Struts package. Any help would be greatly
> > > appreciated. Thanks, gents and ladies.
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> >--
> >To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>