http://www.upwqy.com/details/4.html
编辑httpd.conf文件,输入命令:
vim /etc/apache2/httpd.conf
编辑httpd-vhosts.conf文件,输入命令:
vim /etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
DocumentRoot /Library/WebServer/Documents/mmks
ServerName zc.upwqy123.com
</VirtualHost>
重启Apache,输入命令:
apachectl restart
由于是在本地测试开发网站,还需要修改hosts文件,来将你的域名对应本地的IP,输入命令:
vim /etc/hosts
127.0.0.1 zc.upwqy123.com