wamp绑定域名

 httpd.conf 去掉Include conf/extra/httpd-vhosts.conf前的#

D:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf,添加下面代码

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "e:/www/trjcn/trunk/www"
    ServerName 127.0.0.2
    ServerAlias 127.0.0.2
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "e:/www/trjcn/trunk/www"
    ServerName www.dev.com
    ServerAlias www.dev.com
    ErrorLog "logs/dummy-host.example.com-error.log"
    CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>

出现无权限错误时,需要添加相应的目录权限

<Directory "c:/">
    AllowOverride all
	Require local
</Directory>

猜你喜欢

转载自lxj8749.iteye.com/blog/2274735