If Tomcat doesn't recognize the hostname, it will default to using the
localhost Host setup. Change that to point to your main application's
webroot (the one that responds to multiple subdomains) and I think
you'll be fine.

I have a ColdBox / ColdSpring / Reactor application that responds to
"any" domain name. I set up Apache so the default vhost (with no
ServerName or ServerAlias) proxies to Tomcat (and uses
ProxyPreserveHost On) and then Tomcat has just a default localhost
Host pointing to my webroot. Nice and simple.

You can then override that for specific domain names by adding a vhost
in Apache (with a ServerName) and a Host directive in Tomcat (again
with the same domain name) to route to a different webroot.

Sean

On Sun, Feb 7, 2010 at 11:49 AM, Mats Stromberg <[email protected]> wrote:
> Just added the 123.xyz.com to the server.xml and then calling my page with
> 123.xyz.com:8080 it shows up fine
> Adding the ServerAlias  *.xyz.com 123.xyz.com in Apache that works too...
> (unfortunately :) )
> Regards,
> /Mats/

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to