今天在wamp集成环境下配虚拟主机,没想到虚拟主机开启后,localhost竟然无法访问了,访问 http://localhost/ 提示 403 Forbbiden。觉得可能跟我设置了虚拟主机有关系,因为
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
注释掉,localhost就可以访问。
可能是因为开了虚拟主机,默认访问的目录就变成虚拟主机配置文件下的那些目录,所以讲/wamp/www添加到虚拟主机配置目录下,就可以了。
D:wampbinapacheApache2.4.4confextrahttpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "D:wampwww"
ServerName localhost
ServerAlias local
ErrorLog "logs/localhost-error.log"
CustomLog "logs/localhost-access.log" common
</VirtualHost>
最后
以上就是调皮玉米最近收集整理的关于解决Wamp 开启vhost localhost 提示 403 Forbbiden 的问题!的全部内容,更多相关解决Wamp内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复