Ziel: - richten Sie den virtuellen Host richtig ein.Virtueller Host zeigt Verzeichnisstruktur
zur Zeit arbeite ich auf MAC-System Version 10.10.05 os x yosemite.
Ich habe konfiguriert apache2, PHP und MySQL mit XAMPP
I all the necessary steps für die Konfiguration von virtuellen Host folgen.
meine Datei /private/etc/apache2/extra/httpd-vhosts.conf wäre wie
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName emsv2l.localhost.com
ServerAlias emsv2l.localhost.com
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/emsv2"
ErrorLog "/private/var/log/apache2/apple.com-error_log"
CustomLog "/private/var/log/apache2/apple.com-access_log" common
ServerAdmin [email protected]
<Directory "/Applications/XAMPP/xamppfiles/htdocs/emsv2">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName emsv2l-backend.plutustec.com
ServerAlias emsv2l-backend.plutustec.com
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/emsv2-backend/public“
ErrorLog "/private/var/log/apache2/apple.com-error_log"
CustomLog "/private/var/log/apache2/apple.com-access_log" common
ServerAdmin [email protected]
<Directory "/Applications/XAMPP/xamppfiles/htdocs/emsv2-backend/public“>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Also, wenn ich nun http://emsv2l.localhost.com/
zu projizieren würde schreiben umleiten anstatt Verzeichnisstruktur es zeigt.
meine /etc/hosts
Datei wäre wie
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
#127.0.0.1 localhost
#255.255.255.255 broadcasthost
#::1 localhost
#127.0.0.1 dev.local
#127.0.0.1 emsv2l-backend.plutustec.com # emsv2-backend
#127.0.0.1 emsv2l.plutustec.com # emsv2
#127.0.0.1 plutustec.com #localplutus site
127.0.0.1 emsv2l.localhost.com
127.0.0.1 emsv2l-backend.plutustec.com
Jede Hilfe würde geschätzt.
tun Sie Zugriff auf Apache-Service haben? Möglicherweise müssen Sie Apache neu starten. – ImAtWar
viele Zeit habe ich Apache neu starten mit XAMPP GUI. –
@ShashankShah können Sie uns Ihre Dateien unter '/ Anwendungen/XAMPP/xamppfiles/htdocs/emsv2 'zeigen gibt es einen Index. * Datei dort? – lloiacono