Page 1 of 1

Virtualhost Apache2

Posted: 2006-04-27 09:40
by binford6100turbo
Hi,

habe den Apache2 auf einem Debian 3.1 sarge laufen. Hier sollen nun 2 Domains eingetragen werden:

the-domain1-people.de
the-domain2-people.de

In der httpd.conf habe ich folgendes stehen:
NameVirtualHost xxx.xxx.xx.xx:80

<VirtualHost http://www.the-domain1-people.de:80>

ServerName the-domain1-people.de
ServerAlias http://www.the-domain1-people.de
DocumentRoot /var/www/domains/the-domain-people/the-domain1-people.de/htdocs
ErrorLog /var/www/domains/the-domain-people/the-domain1-people.de/logs/error_log
CustomLog /var/www/domains/the-domain-people/the-domain1-people.de/logs/access.log combined

</VirtualHost>

<VirtualHost http://www.the-domain2-people.de:80>

ServerName the-domain2-people.de
ServerAlias http://www.the-domain2-people.de
DocumentRoot /var/www/domains/the-domain-people/the-domain2-people.de/htdocs
ErrorLog /var/www/domains/the-domain-people/the-domain2-people.de/logs/error_log
CustomLog /var/www/domains/the-domain-people/the-domain2-people.de/logs/access.log combined

</VirtualHost>
Wenn ich den Apache starte kommt folgende Fehlermeldung:
Starting web server: Apache2[Thu Apr 27 09:29:19 2006] [warn] VirtualHost http://www.the-domain1-people.de:80 overlaps with VirtualHost http://www.the-domain2-people.de:80, the first has precedence, perhaps you need a NameVirtualHost directive
Woran liegt das?! Wenn ich die Domain2 aus der httpd.conf lösche funktioniert alles bestens...

Gruß
Binford

Re: Virtualhost Apache2

Posted: 2006-04-27 10:43
by hornox

Re: Virtualhost Apache2

Posted: 2006-04-27 11:09
by binford6100turbo
ok, genau das war der Fehler... Funktioniert jetzt!

Danke!