【问题标题】:Apache 403 Error WampServer 2Apache 403 错误 WampServer 2
【发布时间】:2012-11-27 06:10:41
【问题描述】:

我安装了 WampServer 2,并在我的计算机上创建了一个别名 test,它指向目录 g:/test/。

但是,当我尝试访问 localhost/test/ 时,我不断收到 403 错误

这是由我的 httpd.conf 中的这些行引起的(如果我将这些行注释掉,它会加载)

<Directory />
    AllowOverride none
    Require all denied
</Directory>

我的测试配置如下:

Alias /test/ "g:/test/" 
<Directory "g:/test/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order allow,deny
    Allow from all
</Directory>

如何覆盖我的 test.conf 文件中的 Require all denied 以停止 403 错误?

错误日志如下: [Sun Dec 09 18:51:23.757803 2012] [authz_core:error] [pid 5128:tid 884] [client ::1:50622] AH01630: client denied by server configuration: G:/test/

访问日志内容如下: ::1 - - [09/Dec/2012:18:51:23 +0000] "GET /test/ HTTP/1.1" 403 207

【问题讨论】:

    标签: apache configuration webserver alias http-status-code-403


    【解决方案1】:

    尝试替换已弃用的:

    Order allow,deny
    Allow from all
    

    作者:

    Require all granted
    

    仅关注Apache >= 2.4。但是,我建议禁用 mod_access_compat(LoadModule 行)以避免与 Require 发生 Order/Allow/Deny 冲突。

    【讨论】:

    • 感谢工作。一旦允许,我会接受这个答案。
    【解决方案2】:

    选项索引 FollowSymLinks MultiViews 允许覆盖所有 允许所有人 #需要本地 要求所有授予

    上面的文件注释#需要本地 添加额外的要求全部授予

    解决了

    【讨论】:

      猜你喜欢
      • 2016-12-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多