标签:
分三步:
一,开启虚拟域名设置,在路径中找到(apache\apache2.4.9\conf)httpd.conf 配置文件,
去掉 " Include conf/extra/httpd-vhosts.conf " 前面的" # " # Virtual hosts Includeconf/extra/httpd-vhosts.conf
二,关联本地目录,在路径找到(apache\apache2.4.9\conf\extra)httpd-vhosts.conf 配置文件
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\wamp\www\newkir"
ServerName web.kir.com
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:\wamp\www"
ServerName localhost
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
三,关联本地域名解析,在路径找到(C:\Windows\System32\drivers\etc)hosts 配置文件,添加如下虚拟域名
127.0.0.1 localhost
127.0.0.1 web.kir.com
标签:
原文地址:http://www.cnblogs.com/liangsongbai/p/5219609.html