httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: [users@httpd] VirtualHost hostname1.com:0 overlaps with VirtualHost hostname2.com:0
Date Thu, 07 May 2009 20:05:33 GMT
Eric Covener wrote:
> On Thu, May 7, 2009 at 12:29 PM, Noah <admin2@enabled.com> wrote:
>> Hi there,
>>
>> I've googled this issue and still not able to Make sense of a cure. Also the
>> error message does explain what is happening but nothing jumps out as to how
>> to fix the problem.
>>
>> "VirtualHost hostname1.com:0 overlaps with VirtualHost hostname2.com:0, the
>> first has precedence, perhaps you need a NameVirtualHost directive"

quote 1 :
Start by looking at the output from apache2ctl -S, and make sure all 
your vhosts either use *:80 or *:443.

Of course, your NameVirtualHost must match that value.

quote 2:
> They resolve to the same IP address.  Hostnames are quite confusing in
> the VH and NVH directives, generally better to just use a wildcard,
> like *:80, unless you have some other requirements.
> 
:-)

Guys, do you realise you're probably confusing this poor soul no end ?

Noah,

- you need only *one* NameVirtualHost line, in total.
- make it like so :
NameVirtualHost *:80

- then, for each of the virtual host configurations, make sure the first 
line is
<VirtualHost *:80>
(exactly the same as what comes at the end of the NameVirtualHost line, 
they *must* match).

Depending on what system this is, and depending how the Apache packagers 
for that kind of system, in their wisdom, decided to do with the Apache 
configuration files, the best place to put the single NameVirtualHost 
directive may vary somewhat.  But make sure it occurs only once, before 
the first <VirtualHost *:80> line.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message