Virtualhost Apache2

Apache, Lighttpd, nginx, Cherokee
Post Reply
binford6100turbo
Posts: 35
Joined: 2005-12-30 13:38
 

Virtualhost Apache2

Post 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
binford6100turbo
Posts: 35
Joined: 2005-12-30 13:38
 

Re: Virtualhost Apache2

Post by binford6100turbo »

ok, genau das war der Fehler... Funktioniert jetzt!

Danke!
Post Reply