xampp 設定虛擬主機
阿新 • • 發佈:2018-12-29
mac 下xampp 設定虛擬主機
開啟 htttpd.conf 搜尋vhosts
#Virtual hosts
#Include /Applications/XAMPP/etc/extra/httpd-vhosts.conf
把Include 前面# 去掉
搜尋 User Deamon ,把Deamon 給成你自己的使用者名稱
開啟 /Applications/XAMPP/etc/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>
# My custom host
<VirtualHost *:80>
ServerName web1.com
DocumentRoot "/Users/yourusername/web1"
<Directory "/Users/yourusername/web1">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/web1.com-error_log"
</VirtualHost>