zoukankan      html  css  js  c++  java
  • 启动wamp报错 You don't have permission to access / on this server

    安装完wamp之后,安装网上的教程设置虚拟路径,出现了问题,同样的问题由不同的原因导致。

    1、httpd.conf中添加Listen 相应的端口,我的是8080

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

    3、然后调用localhost,就出现下面的错误:

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

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

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

    <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>

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

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

    7、然后也是找了很多,多是说什么allow from all等等的问题。但无论我怎么设置都是这个问题。

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

    <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>
  • 相关阅读:
    php -- php数组相关函数
    php -- 数组排序
    php -- in_array函数
    php -- 魔术方法 之 删除属性:__unset()
    无符号整型与有符号整型相运算规则
    N个节点的二叉树有多少种形态
    getopt_long
    typedef
    约瑟夫环问题算法(M)
    C语言基础
  • 原文地址:https://www.cnblogs.com/jghdream/p/4995055.html
Copyright © 2011-2022 走看看