Mac Apache 配置二级域名

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u014595375/article/details/78772939

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

猜你喜欢

转载自blog.csdn.net/u014595375/article/details/78772939