virtualhost -Problem. Browser lädt immer xampp seite

Alles, was den Apache betrifft, kann hier besprochen werden.

virtualhost -Problem. Browser lädt immer xampp seite

Postby etech » 02. November 2006 09:20

Hallo Leute

Bin ein Xampp-Neuling (auch im Linuxbereich :-))
Ich habe das offizielle Xampp-Handbuch gekauft und habe eine kleine Frage.
Das erste kleine Virtualhost-Beispiel bereitet mir schon Probleme.
Ich will auf localhost2 zugreifen, es kommt aber immer die Standard-XAMPP-Seite.


/opt/lampp/etc/extra/httpd-vhosts.conf


NameVirtualHost 127.0.0.2

<VirtualHost 127.0.0.1:80>
ServerAdmin webmaster@localhost1
DocumentRoot /opt/lampp/vhosts/localhost1/htdocs
ErrorLog /opt/lampp/vhosts/localhost1/logs/error_log
CustomLog /opt/lampp/vhosts/localhost1/logs/acces_log common
</VirtualHost>

<VirtualHost 127.0.0.2:80>
ServerAdmin webmaster@localhost2
DocumentRoot /opt/lampp/vhosts/localhost2/htdocs
ServerName localhost2
ErrorLog /opt/lampp/vhosts/localhost2/logs/error_log
CustomLog /opt/lampp/vhosts/localhost2/logs/acces_log common
</VirtualHost>

<VirtualHost 127.0.0.2:80>
ServerAdmin webmaster@localhost3
DocumentRoot /opt/lampp/vhosts/localhost3/htdocs
ServerName localhost3
ErrorLog /opt/lampp/vhosts/localhost3/logs/error_log
CustomLog /opt/lampp/vhosts/localhost3/logs/acces_log common
</VirtualHost>


Ich nehme an in der httpd.conf von apache2 muss was eingestellt werden.

Danke & Gruss
eTech
etech
 
Posts: 6
Joined: 02. November 2006 08:58
Location: Zürich

Postby deepsurfer » 02. November 2006 16:30

Kurz und bündig....

Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost1
ServerAdmin webmaster@localhost1
DocumentRoot /opt/lampp/vhosts/localhost1/htdocs
ServerName localhost1
ErrorLog /opt/lampp/vhosts/localhost1/logs/error_log
CustomLog /opt/lampp/vhosts/localhost1/logs/acces_log common
</VirtualHost>

<VirtualHost *:80>
ServerAdmin webmaster@localhost2
DocumentRoot /opt/lampp/vhosts/localhost2/htdocs
ServerName localhost2
ErrorLog /opt/lampp/vhosts/localhost2/logs/error_log
CustomLog /opt/lampp/vhosts/localhost2/logs/acces_log common
</VirtualHost>

<VirtualHost *:80>
ServerName localhost3
ServerAdmin webmaster@localhost3
DocumentRoot /opt/lampp/vhosts/localhost3/htdocs
ServerName localhost3
ErrorLog /opt/lampp/vhosts/localhost3/logs/error_log
CustomLog /opt/lampp/vhosts/localhost3/logs/acces_log common
</VirtualHost>
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian


Return to Apache

Who is online

Users browsing this forum: No registered users and 3 guests