tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: How to configure different default webapp in function of requested hostname on one tomcat server
Date Thu, 26 Aug 2010 12:40:06 GMT
arnaud icard wrote:
> Yes this is where I made a mistake.
> The parameters "name" and "defaultHost" must be the FULL name (i.e. 
> hostname.domain)
No. I mean no, it is not exactly that.

For the defaultHost, it does not matter very much, because it is the default and anything

that does not match exactly will end up there anyway.

But for the others, as far as I know, the point is that the Host name attribute *must 
match the Host: header in the HTTP request, exactly*.
If requests can come in with a Host: header being just "appli1", then you need to have, in

the corresponding Host tag,
- either the name attribute = "appli1"
- or an <Alias>appli1</Alias> tag inside the <Host> section.

For example:

  <Host name="">

Unless Tomcat itself does a double reverse DNS lookup to make "appli1" equivalent to 
"", but this would surprise me.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message