tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Lear <chris.l...@laculine.com>
Subject Re: Is there a way so specify a wildcard in host/alias to avoid dealing with bunch of virtual hosts?
Date Thu, 03 Aug 2006 16:17:02 GMT
* David Gagnon wrote (03/08/06 17:12):
> Hi all,
> 
>   I have a lot of virtual hosts on my network.  I need all of them to 
> access the same application on a tomcat 5.5.  I know there are the ALIAS 
> directive in server.xml but the problem is that new virtual host may be 
> added when the application is running and I don't want to manually 
> manage them. So is there a way to have a host/application that will 
> accept request from any virtual host?  I checked the code in Mapper.java 
> and there is no use of wildcard there. 
> 
> Like:
> c1.toto.com
> c2.toto.com
> c3.toto.com
> c4.toto.com
> 
> Is there any solution ? Thanks for the help!

In server.xml something like
  <Engine name="Catalina" defaultHost="c.toto.com">
  <Host name="c.toto.com" appBase="webapps">
  </Engine>
should do it.

The defaultHost tells tomcat what to do with requests to hostnames that 
aren't otherwise mapped.

Chris

---------------------------------------------------------------------
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