Apache 403 错误 WampServer 2

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

我安装了 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 文件中的“要求全部拒绝”以阻止 403 错误?

错误日志显示: [Sun Dec 09 18:51:23.757803 2012] [authz_core:error] [pid 5128:tid 884] [client::1:50622] AH01630:客户端被服务器配置拒绝:G:/test/

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

最佳答案

尝试替换已弃用的:

Order allow,deny
Allow from all

作者:

Require all granted

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

关于Apache 403 错误 WampServer 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13790634/

相关文章:

django - 如何在一台服务器上为 Django 设置多个具有不同数据库的帐户?

php wamp; www 中的禁止文件夹

php - Apache 显示 It Works 而不是 WordPress 起始页

java - 在 Spring 中使用 @Configuration 创建一个 bean 集合

javascript - 尝试设置 node.js Web 服务器

java - 如何将两个 android 设备连接到中央服务器?

mysql - 在 WIndows 7 家庭普通版上安装 XAMPP 时出错

apache - .htaccess 在 xampp (ubuntu) 中不起作用

java - 在 Spring XML 配置文件中连接字符串?

linux - 配置驱动、基于文本的 Linux 配置向导