ゴール: - 仮想ホストを正しく設定します。仮想ホストにディレクトリ構造が表示されます
現在、私はMACシステムのバージョン10.10.05 os x yosemiteに取り組んでいます。
私は、仮想ホストを設定するためのall the necessary stepsに従っていXAMPP
使用apache2の、PHPとMySQLを設定しています。 /private/etc/apache2/extra/httpd-vhosts.conf
私のファイルだから
<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>
ようになり、今私はhttp://emsv2l.localhost.com/
を書く場合は代わりに、それはディレクトリ構造を示すのプロジェクトにリダイレクトされます。
私/etc/hosts
ファイルには、任意の助けをいただければ幸いです
##
# 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
ようなものです。
を求めた場合は、apacheのサービスへのアクセスを持っていますか? Apacheを再起動する必要があるかもしれません。 – ImAtWar
多くの時間私はXAMPP GUIを使用してApacheを再起動している。 –
@ShashankShahあなたのファイルを '/ Applications/XAMPP/xamppfiles/htdocs/emsv2'に表示することができます。 – lloiacono