启动wamp报错 You don't have permission to access / on this server

安装完wamp以后,安装网上的教程设置虚拟路径,出现了问题,一样的问题由不一样的缘由致使。web

一、httpd.conf中添加Listen 相应的端口,个人是8080ide

二、httpd.conf去掉Include conf/extra/httpd-vhosts.conf前面的#。this

三、而后调用localhost,就出现下面的错误:spa

Forbidden

You don't have permission to access /on this server.

解决方法:在conf\extra下面的httpd-vhosts.conf文件中添加,code

注意:虚拟目录中也要写一下目录的访问权限,下面蓝色部分server

<VirtualHost *:8080>
    DocumentRoot D:/wamp/www/web
    ServerName localhost
    <Directory "d:/wamp/www/aa">
        Options Indexes FollowSymLinks
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>
</VirtualHost>

六、localhost运行好使了,但运行localhost:8080却有新的问题:blog

Forbidden

You don't have permission to access /on this server.

七、而后也是找了不少,可能是说什么allow from all等等的问题。但不管我怎么设置都是这个问题。教程

最后,发现把Options Indexes FollowSymLinks 后面添加上 ExecCGI就好使了。
io

<VirtualHost *:8080>
    DocumentRoot D:/wamp/www/aa
    ServerName localhost
    <Directory "d:/wamp/www/aa">
        Options Indexes FollowSymLinks ExecCGI
        Order allow,deny
        Allow from all
        AllowOverride All
    </Directory>
</VirtualHost>
相关文章
相关标签/搜索