tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From August Detlefsen <>
Subject Re: Mapping multiple hosts to single Host
Date Wed, 06 Feb 2002 20:00:41 GMT
In httpd.conf, inside each VirtualHost, you can set the ServerAlias
directive - it will allow the same VirtualHost to recognize multiple
domain names: 



    #deploy webapps for this site
    WebAppDeploy     ROOT      conn  /
    WebAppDeploy     manager   conn  /manager


This way you can have multiple domains point to the same <Host> in
server.xml. I am not sure if Apache passes the original domain name or
the aliased one to Tomcat though. 

Otherwise you will have to create multiple <Host>s in server.xml and
deploy your context in each one. Does anyone know how to configure TC
to recognize the same webapp across all Hosts?


--- wrote:
> I've read many posts about virtual hosts and Tomcat with and without 
> mod_jk/mod_webapp, but haven't found a real answer to my question. 
> We want to 
> map multiple hosts to a single <Host> config in server.xml.  I
> thought the 
> defaultHost setting would do this, but it doesn't work.  If I have
> DNS entries 
> for and that point to the same IP
> address and 
> an Apache virtual host and on to mod_webapp, if I don't define and
> <Host> 
> settings, Tomcat will serve out any web apps in the webapps
> directory.  The 
> problem is that I'd like to run the manager app, but that requires 
> privileged="true" which (as far as I know) must be done in a
> <Host><Context> 
> config.  Basically we want to map multiple domains to a webapp and
> based on 
> the "host" value, send a response out.  Kind of along the lines of
> Apache's 
> wildcard host syntax.
> Hope the post isn't too confusing.  Any ideas?
> -Pat
> --
> To unsubscribe:   <>
> For additional commands: <>
> Troubles with the list: <>

Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message