Hallo zusammen,
ich versuch jetzt schon seit mehreren Tagen einen vhost einzurichten. Aber trotz allem was ich gelesen habe, klappt es nicht wirklich.
Vielleicht könnt ihr mir ja helfen. Bin noch recht neu in der Materie.
Also ich möchte unter Xampp mehrere Websites local testen etc. Diese sollen alle einen eigenen vhost haben, bzw Adresse.
Sprich z. B. Website a) erreiche ich unter localhost:9999
Website b) erreiche ich unter localhost:9998
usw.
Aber irgendwie funktioniert das nicht. Kommt immer Seiten-Ladefehler.
Meine httpd-vhosts:
Use name-based virtual hosting.
NameVirtualHost *:80
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
#<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host.localhost
##DocumentRoot "D:/xampp/htdocs/dummy-host.localhost"
##ServerName dummy-host.localhost
##ServerAlias www.dummy-host.localhost
##ErrorLog "logs/dummy-host.localhost-error.log"
##CustomLog "logs/dummy-host.localhost-access.log" combined
#</VirtualHost>
##<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot "D:/xampp/htdocs/dummy-host2.localhost"
##ServerName dummy-host2.localhost
##ServerAlias www.dummy-host2.localhost
##ErrorLog "logs/dummy-host2.localhost-error.log"
##CustomLog "logs/dummy-host2.localhost-access.log" combined
##</VirtualHost>
<VirtualHost *:80>
ServerAdmin cathrin@pixelfeelings.de
DocumentRoot "/xampp/htdocs"
ServerName localhost
<Directory "/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:9999>
ServerAdmin cathrin@pixelfeelings.de
DocumentRoot "/xampp/htdocs/test"
ServerName localhost:9999
<Directory "/xampp/htdocs/test">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
________________________________________________
host:
# Copyright (c) 1993-2006 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
___________________________________________________
Ich wäre mehr als dankbar, wenn mir jemand weiterhelfen könnte. Bin am verzweifeln.
Beste Grüße
Cathrin