Mittlerweile habe ich den Mainserver auch noch in einen Virtual Host gepackt. (Deshalb 2 NameVirtualHosts)
Läuft unter WinXP, XAMPP 1.5.3a (Apache 2.2.2), ZoneAlarm (Berechtigungen für Apache gegeben)
Hier mal ein Auszug der httpd-vhosts.conf:
- Code: Select all
NameVirtualHost 127.0.0.1
NameVirtualHost 127.0.0.2
<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@localhost
DocumentRoot "E:/xampp/xampp/htdocs"
ServerName localhost
ErrorLog "E:/xampp/xampp/apache/logs/error.log"
CustomLog "E:/xampp/xampp/apache/logs/access.log" common
</VirtualHost>
<VirtualHost 127.0.0.2:80>
ServerAdmin webmaster@localhost
DocumentRoot "E:/xampp/xampp/vhosts/localhost1/htdocs"
ServerName localhost1
ErrorLog "E:/xampp/xampp/vhosts/localhost1/logs/error_log"
CustomLog "E:/xampp/xampp/vhosts/localhost1/logs/access_log" common
</VirtualHost>
<VirtualHost 127.0.0.2:80>
ServerAdmin webmaster@localhost
DocumentRoot "E:/xampp/xampp/vhosts/localhost2/htdocs"
ServerName localhost2
ErrorLog "E:/xampp/xampp/vhosts/localhost2/logs/error_log"
CustomLog "E:/xampp/xampp/vhosts/localhost2/logs/access_log" common
</VirtualHost>
<VirtualHost 127.0.0.2:80>
ServerAdmin webmaster@localhost
DocumentRoot "E:/xampp/xampp/vhosts/localhost3/htdocs"
ServerName localhost3
ErrorLog "E:/xampp/xampp/vhosts/localhost3/logs/error_log"
CustomLog "E:/xampp/xampp/vhosts/localhost3/logs/access_log" common
</VirtualHost>
Die hosts-Datei von Windows sieht so aus:
- Code: Select all
127.0.0.1 localhost
127.0.0.2 localhost1 localhost2 localhost3
Was jetzt konkret nicht geht ist der Aufruf von http://localhost1 , http://localhost2 , http://localhost3, die localhost geht aber (die Mainservereinstellungen habe ich aus der httpd.conf auskommentiert, also nicht dass hier mit "doppeltem" Boden wäre und nur deshalb geht. )
Ach genau, gegooglt habe ich auch schon wie blöd, überall erhalte ich nur die gleiche Info wie im Handbuch, als wie die config sein muss und wie es theoretisch funktionieren sollte, tuts aber leider nicht. Auch www.apache.org war mir keine Hilfe.