vhosts funktionieren nicht!

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

vhosts funktionieren nicht!

Postby neufra » 25. July 2009 20:20

Hallo Allerseits,

ich habe auf meinem XP-Rechner xampp in der letzten Version installiert und versuche mehrere Subdomains als vhost einzubinden. Lokal liegen die Entwicklungsdateien in folgender Struktur vor, wobei die Domain immer dieselbe ist:

E:\develop\www\domain.eu\develop
E:\develop\www\domain.eu\g3
E:\develop\www\domain.eu\Joomla
E:\develop\www\domain.eu\JooTest
E:\develop\www\domain.eu\newpict
E:\develop\www\domain.eu\pic_cpg

xampp ist unter C:\xampp installiert.

Die "hosts" Einträge sehen folgendermaßen aus:

127.0.0.1 localhost
127.0.0.1 cpg.domain.ew
127.0.0.1 g3.domain.ew
127.0.0.1 gallery.domain.ew
127.0.0.1 joomla.domain.ew
127.0.0.1 domain.ew http://www.domain.ew
127.0.0.1 test.domain.ew

Die "httpd-vhosts.conf" sieht so aus:

#
# Virtual Hosts
#

NameVirtualHost *:80

## localhost
<VirtualHost *:80>
DocumentRoot C:/xampp/htdocs
ServerName localhost
ErrorLog "E:/develop/logs/localhost-error.log"
CustomLog "E:/develop/logs/localhost-access.log" common
DirectoryIndex index.html index.php index.htm
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

## cpg.domain.eu
<VirtualHost *:80>
DocumentRoot E:/develop/www/domain.eu/pic_cpg
ServerName cpg.domain.ew
ServerAlias cpg.domain.ew
ErrorLog "E:/develop/logs/pig_cpg-error.log"
CustomLog "E:/develop/logs/pig_cpg-access.log" common
DirectoryIndex index.html index.php index.htm
<Directory "E:/develop/www/domain.eu/pig_cpg">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

## g3.domain.eu
<VirtualHost *:80>
DocumentRoot E:/develop/www/domain.eu/g3
ServerName g3.domain.ew
ServerAlias g3.domain.ew
ErrorLog "E:/develop/logs/g3-error.log"
CustomLog "E:/develop/logs/g3-access.log" common
DirectoryIndex index.html index.php index.htm
<Directory "E:/develop/www/domain.eu/g3">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

## gallery.domain.eu
<VirtualHost *:80>
DocumentRoot E:/develop/www/domain.eu/newpict
ServerName gallery.domain.ew
ServerAlias gallery.domain.ew
ErrorLog "E:/develop/logs/newpict-error.log"
CustomLog "E:/develop/logs/newpict-access.log" common
DirectoryIndex index.html index.php index.htm
<Directory "E:/develop/www/domain.eu/newpict">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

## joomla.domain.eu
<VirtualHost *:80>
DocumentRoot E:/develop/www/domain.eu/JooTest
ServerName joomla.domain.ew
ServerAlias joomla.domain.ew
ErrorLog "E:/develop/logs/jootest-error.log"
CustomLog "E:/develop/logs/jootest-access.log" common
DirectoryIndex index.html index.php index.htm
<Directory "E:/develop/www/domain.eu/JooTest">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

## http://www.domain.eu
<VirtualHost *:80>
DocumentRoot E:/develop/www/domain.eu/Joomla
ServerName http://www.domain.ew
ServerAlias domain.ew http://www.domain.ew
ErrorLog "E:/develop/logs/joomla-error.log"
CustomLog "E:/develop/logs/joomla-access.log" common
DirectoryIndex index.html index.php index.htm
<Directory "E:/develop/www/domain.eu/Joomla">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

## test.domain.eu
<VirtualHost *:80>
DocumentRoot E:/develop/www/domain.eu/develop
ServerName test.domain.ew
ServerAlias test.domain.ew
ErrorLog "E:/develop/logs/develop-error.log"
CustomLog "E:/develop/logs/develop-access.log" common
DirectoryIndex index.html index.php index.htm
<Directory "E:/develop/www/domain.eu/develop">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
AllowOverride All
</Directory>
</VirtualHost>

Jetzt mein Problem.
Beim Aufruf von http://www.domain.ew erscheint die richtige Seite, ebenfalls beim Aufruf von localhost.
Wird jedoch cpg.domain.ew aufgerufen kommt die Meldung: Zugriff verweigert! Der Zugriff auf das angeforderte Verzeichnis ist nicht möglich. Entweder ist kein Index-Dokument vorhanden oder das Verzeichnis ist zugriffsgeschützt.

Bei den Aufrufen g3.domain.ew, gallery.domain.ew, joomla.domain.ew erscheint die im xampp-htdocs Verzeichnis enthaltene index.html, die den Text "It works!" ausgibt.

Kann mir jemand sagen was da falsch läuft?
neufra
 
Posts: 4
Joined: 25. July 2009 18:09
Location: A-8580 Köflach

Return to XAMPP für Windows

Who is online

Users browsing this forum: No registered users and 28 guests