Page 1 of 1

Vhost Problem: NameVirtualHost has no effect and will be removed

Posted: 2016-01-12 16:54
by amiga1200
Sonst habe ich immer Linux Suse von Anfang über eine CD installiert,
da gabt es wenig problem.
Nun habe ich einen 1&1 Root-Server vor mir und wollte Domain in der Vhost eintragen,
aber irgendwie funktioniert es nicht so wie geplant.

unter
test.domain.de (2. Eintrag in der Vhost)
erscheint die Webseite des 1. Eintrag.

Apache meldet beim Restart
AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/vhosts.d/domain.conf:1
Als System läuft Suse 13.1

Code: Select all

 NameVirtualHost *:80

<VirtualHost *:80>
    ServerName beispiel.de
    ServerAlias *.beispiel.de
   	DocumentRoot /webserver/http/htdocs/beispiel
    ErrorLog /var/log/apache2/beispiel/error_log
    CustomLog /var/log/apache2/beispiel/access_log combined
</VirtualHost>

<VirtualHost *:80>
    ServerName http://test.domain.de/
    DocumentRoot /webserver/http/htdocs/domain
    ErrorLog   /var/log/apache2/domain/error_log
    CustomLog /var/log/apache2/domain/access_log combined
 </VirtualHost>

Re: Vhost Problem: NameVirtualHost has no effect and will be removed

Posted: 2016-01-12 19:23
by Joe User
Einfach die erste Zeile löschen, also diese:

Code: Select all

NameVirtualHost *:80

Re: Vhost Problem: NameVirtualHost has no effect and will be removed

Posted: 2016-01-13 10:24
by amiga1200
Super, es lag tatsächlich am NameVirtualHost *:80 in der 1. Zeile

Nur das habe ich bisher immer benötigt, gibt es dafür einen Grund warum das nun überflüssig ist?

Vielen Dank