virtualhosts (subdomains) linken immer auf root

Irgendwelche Probleme mit XAMPP für Windows? Dann ist hier genau der richtige Ort um nachzufragen.

virtualhosts (subdomains) linken immer auf root

Postby Janus » 13. May 2009 13:37

hallo, ich habe das problem dass meine konfigurierten virtuellen hosts nicht mehr funktionieren, ich musste den pc neu aufsetzen, xampp (selbe version) neu installiert und httpd-vhosts gesichert doch die vhosts gehen nicht mehr...

so sieht ein snippet der httpd-vhosts datei aus:
Code: Select all
<VirtualHost localhost:80>
 ServerAdmin webmaster@localhost
 DocumentRoot "F:\xampp\htdocs"
 ServerName localhost
 ServerAlias localhost
 DirectoryIndex index.php index.html index.html index.htm index.shtml
</VirtualHost>


<VirtualHost beispiel.localhost:80>
 ServerAlias beispiel.localhost
 ServerName beispiel.localhost
 DocumentRoot "F:\xampp\htdocs\beispiel"
 DirectoryIndex index.php index.html index.html index.htm index.shtml
</VirtualHost>


und so meine hosts datei:
Code: Select all
127.0.0.1    localhost
127.0.0.1    beispiel.localhost


wenn ich nun auf http://localhost gehe funktioniert alles, xampp panel lädt wie es soll...
wenn ich nun aber http://beispiel.localhost aufrufe wechselt er automatisch zu http://beispiel.localhost/xampp/ und somit auch zum xampp panel anstatt zu F:\xampp\htdocs\beispiel bzw. http://localhost/beispiel

ich versteh nicht warum? bitte um hilfe
Janus
 
Posts: 12
Joined: 12. May 2004 12:23

Re: virtualhosts (subdomains) linken immer auf root

Postby Wiedmann » 13. May 2009 13:55

Code: Select all
--- httpd-vhosts.conf.orig   2009-05-13 14:49:59.545250000 +0200
+++ httpd-vhosts.conf   2009-05-13 14:54:46.685875000 +0200
@@ -1,15 +1,15 @@
-<VirtualHost localhost:80>
+NameVirtualHost *:80
+
+<VirtualHost *:80>
 ServerAdmin webmaster@localhost
-DocumentRoot "F:\xampp\htdocs"
+DocumentRoot "F:/xampp/htdocs"
 ServerName localhost
-ServerAlias localhost
 DirectoryIndex index.php index.html index.html index.htm index.shtml
 </VirtualHost>
 
 
-<VirtualHost beispiel.localhost:80>
-ServerAlias beispiel.localhost
+<VirtualHost *:80>
 ServerName beispiel.localhost
-DocumentRoot "F:\xampp\htdocs\beispiel"
+DocumentRoot "F:/xampp/htdocs/beispiel"
 DirectoryIndex index.php index.html index.html index.htm index.shtml
 </VirtualHost>
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: virtualhosts (subdomains) linken immer auf root

Postby Janus » 13. May 2009 14:12

hi, danke so funktionierts =)

trotzdem komisch warum es vorher ging und nach neuinstallation nicht mehr :?
Janus
 
Posts: 12
Joined: 12. May 2004 12:23


Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 40 guests