1.找到安装Apache路径下的httpd-vhosts.conf文件
2.编辑打开末尾追加
<VirtualHost *:80>
DocumentRoot "f:/apache/Apache2.4/htdocs/zjc"//域名内容的存放路径
ServerName www.album.com
ServerAlias album.com
</VirtualHost>
<Directory "f:/apache/Apache2.4/htdocs/zjc">
Require all granted//给所有权限
</Directory>
3.在C:\Windows\System32\drivers\etc中记事本打开hosts,末尾追加本地地址、域名
4.重启Apache即可