n Tue, Feb 18, 2003 at 02:43:20PM +1100, Matt Hyne wrote:
> 
> Thanks,
> 
> Looks like it needed 
>    
>       ServerAlias domain1
>              . . .
>       ServerAlias domain3
> 
> I would have though this would have been unnecessary.
>

When the web browser request a page in http 1.1, it sends a HostHeader
request which includes the name of the host it is trying to access.

Apache trys to match this up to one of the virtual host entries, but if
it doesn't match exactly, you will be provided with the default
virtualhost, which is allways the first one. (In a NameBased virtualhost
config)

You need to provide aliases for every way that your server will be
accessed. Apache can't guess as to the way the client has a host search
path configured, as the client never finds out the domain part in that
case, just the ip. (e.g if you had two hosts www.domain1.com and
www.domain2.com, which page do you display when the hostheader supplied
is "www"?)

Obviously you would need to add a ServerAlias for each one of your
virtaul hosts.

-Colin
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to