httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Weaver <>
Subject Re: [users@httpd] Virtual Hosts
Date Wed, 24 Mar 2004 19:25:19 GMT
On Wed, Mar 24, 2004 at 07:10:28PM +0000, Matthew Williamson wrote:
> pentium pentium.localdomain localhost
> reays.localdomain localhost
> testbox.localdomain localhost
> Is it that I have something wrong in my hosts file, or should I be
> looking at my http.conf to change my virtual host settings?

VirtualHosts are sequentially read.
And if there is no match for VirtualHosts to distinguish which one
you're wanting to use, the first is used.

Your example:



if you request:
You will get the first VirtualHost, because httpd cannot
distinguish which one you 'really' want.

The common distinguishing factor is ServerName.
so if you request:
(and have that setup in your hosts properly to point
 to your httpd server!)
You would get the second VirtualHost,
since httpd CAN distinguish which
one you 'really' wanted.

1. So you most likely need to change your VirtualHosts
   to include ServerName.
2. You most likely need to change your host file to point
   to pentium for each ServerName.
3. And you would most likely want to change your request
   url from IP address based, to named based.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message