Mac Apache 配置二级域名
sudo vim /etc/apache2/httpd.conf
在最后加下面的配置:
NameVirtualHost *:80
# six
<VirtualHost *:80>
DocumentRoot /Library/WebServer/Documents/sixchat
ServerName six.localhost
ErrorLog /Library/WebServer/Documents/sixchat/logs/sixchat-error_log
CustomLog /Library/WebServer/Documents/sixchat/logs/sixchat-access_log common
</VirtualHost>
重启Apache:
sudo apachectl restart
访问:
http://six.localhost