tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Dillury <mar...@socialchange.net.au>
Subject Re: Virtual Host Context Aliasing
Date Fri, 01 Jun 2001 00:40:34 GMT
I have been told from a collegue of mine that an alias tag can be used.
I have not tested this though, let me know if this works :)


     <Host name="www.mycompany.com" ...>
       ...
       <Alias name="mycompany.com"/>
       ...
     </Host>


--Marcus

On Thu, 31 May 2001, Jeff Kilbride wrote:

> Date: Thu, 31 May 2001 11:12:38 -0700
> From: Jeff Kilbride <jeff@kilbride.com>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Virtual Host Context Aliasing
>
> Hi Daniel,
>
> I have the same problem -- wanting to alias more than one host name to a
> single context. Unfortunately, there is no way to do this. I've heard that
> the 4.0 version of Tomcat may have some abilities for doing this, but it's
> not nearly as straightforward as Apache's ServerAlias directive.
>
> For now, I've turned off zzz.net (using your example) in my DNS and am only
> serving www.zzz.net. I do a lot of connection pooling and other shared
> resources, so I can't afford to have 2 versions of all my contexts running
> at the same time. This is a totally unsatisfactory solution, but it's my
> only choice for the moment.
>
> Thanks,
> --jeff
>
> ----- Original Message -----
> From: "Daniel Zen" <daniel@zendigital.com>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Tuesday, May 29, 2001 8:55 AM
> Subject: Virtual Host Context Aliasing
>
>
> > I would think this would be a common question, but I couldn't find it
> > documented, nor asked on this list.
> >
> > Very often domains are served from 2 urls (www.zzz.net & zzz.net) with the
> > same functionality. When I configure my virtual hosts in Apache's
> httpd.conf
> > this is easy:
> >
> > <VirtualHost _default_:80>
> >  ServerName www.zzz.net
> >  ServerAlias zzz.net
> >  DocumentRoot /home/httpd/html/zzz
> >  <Directory "/home/httpd/html/zzz/WEB-INF">
> >   Options None
> >   Deny from all
> >  </Directory>
> >  JkMount /*.jsp ajp13
> >  JkMount /servlet/* ajp13
> > </VirtualHost>
> >
> > The following properly placed in server.xml creates 2 seperate contexts
> for
> > the same set of servlets and JSPs. Functional, but a little wasteful.
> >
> >   <Host name="www.zzz.net" >
> >        <Context path="" docBase="/home/httpd/html/zzz"
> >         crossContext="true" debug="0" reloadable="true" trusted="false" />
> >   </Host>
> >
> >   <Host name="zzz.net" >
> >        <Context path="" docBase="/home/httpd/html/zzz"
> >         crossContext="true" debug="0" reloadable="true" trusted="false" />
> >   </Host>
> >
> > Now, I how do I do an alias Context in Tomcat's server.xml so that there
> is
> > only one Host/Context with multiple names??????
> >
> > Thank you in advance.
> >
> > Daniel Zen
> >
>

-- 
Marcus Dillury
UNIX Systems Administrator	core competency: /dev/null
http://online.socialchange.net.au
ph: +61 2 9692 5136		fax: +61 2 9692 5192 	mob: 0403 349 339



Mime
View raw message