>  기사  >  php教程  >  apache虚拟主机配置问题解决方案

apache虚拟主机配置问题解决方案

WBOY
WBOY원래의
2016-06-13 11:31:511194검색

1 首先在D:\wamp\bin\apache\Apache2.2.21\conf找到httpd.conf文件打开然后大概在460多行找到 去掉#,然后就是下面的情况 # Virtual hosts Include conf/extra/httpd-vhosts.conf 2 然后在打开D:\wamp\bin\apache\Apache2.2.21\conf\extra中的httpd-vhosts.conf文件 在文件的末尾加上     ServerAdmin webmaster@dummy-host3.example.com     DocumentRoot "d:/wamp/www/4/huaguoshan"     ServerName www.hgs2013.cn     ErrorLog "logs/dummy-host3.example.com-error.log"     CustomLog "logs/dummy-host3.example.com-access.log" common       ServerAdmin webmaster@dummy-host4.example.com     DocumentRoot "d:/wamp/www/test"     ServerName www.test.cn     ErrorLog "logs/dummy-host4.example.com-error.log"     CustomLog "logs/dummy-host4.example.com-access.log" common 写入自己想要的域名。   3 最后打开C:\Windows\System32\drivers\etc中的hosts文件 在文件的最后面把刚才定义的域名给指定一下 127.0.0.1      www.hgs2013.cn 127.0.0.1      www.test.cn 这样就OK了,纯属个人见解

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.