eintyp
Goto Top

Subdomains in XAMPP

Hallo Administratoren,

Ich habe ein Problem mit der Einrichtung von Subdomains bei XAMPP.
Ich will zwei Subdomains:
forum.localhost
home.localhost

Mein XAMPP-Verzeichnis: C:\xampp
Meine httpd-vhosts.conf sieht so aus (ohne Kommentare):
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/subs/forum"  
    ServerName forum.localhost
    ServerAlias www.forum.localhost
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/subs/home"  
    ServerName home.localhost
    ServerAlias www.home.localhost
</VirtualHost>

Meine hosts-Datei:
127.0.0.1 localhost

Wenn ich in der Konsole "httpd -S" eingebe bekomme ich die Meldung:
[Sun Apr 17 17:04:42 2011] [warn] _default_ VirtualHost overlap on port 80, the
first has precedence
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:80                   forum.localhost (C:/xampp/apache/conf/extra/httpd-vhosts.conf:75)
*:80                   home.localhost (C:/xampp/apache/conf/extra/httpd-vhosts.conf:80)
_default_:443          localhost (C:/xampp/apache/conf/extra/httpd-ssl.conf:80)
Syntax OK

Wenn ich auf http://localhost/ gehe bekomm ich die /subs/forum/index.php (eigentliche forum.localhost) angezeigt.

Bevor ich Kommentare wie "Google ist dein Freund" oder "Benutz die Suchfunktion" lese:
Ich habe mir schon diesen Beitrag durchgelesen und Google durchgeforstet, aber nichts hilfreiches gefunden.

Ich hoffe ihr könnt mir bei dieser Sache helfen.

-eintyp-

Content-Key: 164757

Url: https://administrator.de/contentid/164757

Printed on: April 26, 2024 at 07:04 o'clock

Mitglied: 16568
16568 Apr 17, 2011 at 16:46:24 (UTC)
Goto Top
Tach,

wenn ich das hier lese:

Zitat von @EinTyp:
> <VirtualHost *:80>
>     DocumentRoot "C:/xampp/htdocs/subs/forum"  
>     ServerName forum.localhost
>     ServerAlias www.forum.localhost
> </VirtualHost>
> <VirtualHost *:80>
>     DocumentRoot "C:/xampp/htdocs/subs/home"  
>     ServerName home.localhost
>     ServerAlias www.home.localhost
> </VirtualHost>
> 

dann muß ich sagen, daß Du das vielleicht gelesen, aber nicht verstanden hast...
<VirtualHost *:80>

Ts ts ts ts...

Und:
--- --- ---
Meine hosts-Datei:
127.0.0.1 localhost

Ist das nicht auch ein wenig dürftig?
Vielleicht nochmal das Kapitel DNS lesen...?


Lonesome Walker
Member: EinTyp
EinTyp Apr 17, 2011 at 17:03:20 (UTC)
Goto Top
Hallo,
1.
Und wie wäre das richtig?
So?
<VirtualHost localhost:80>
Ich will sie ja alle auf Port 80 bekommen

2.
Ich brauche ja nur localhost und will keine neue Domain.

-eintyp-
Member: EinTyp
EinTyp Apr 17, 2011 at 18:47:38 (UTC)
Goto Top
Ich habe es heraus gefunden.
Gute Site

-eintyp-
Mitglied: 16568
16568 Apr 19, 2011 at 10:56:12 (UTC)
Goto Top
Na siehste face-smile

Es ist schon wichtig, daß Dein Rechner auch weiß, wo er was findet, und dem Apachen muß man auch mitteilen, von wo er was ausliefern soll face-wink


Lonesome Walker