我是靠谱客的博主 调皮玉米,最近开发中收集的这篇文章主要介绍解决Wamp 开启vhost localhost 提示 403 Forbbiden 的问题!,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

今天在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 开启vhost localhost 提示 403 Forbbiden 的问题!所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(68)

评论列表共有 0 条评论

立即
投稿
返回
顶部