我在Debian测试中全新安装了Apache2,并在这样的目录中配置了虚拟主机:
<Directory "/path/to/project">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
但是,当我访问它时,它向我显示403禁止错误,并且错误日志显示:
[Mon Sep 23 22:07:57.249276 2013] [authz_core:debug] [pid 8599] mod_authz_core.c(802): [client 127.0.0.1:49057] AH01626: authorization result of Require all denied: denied
[Mon Sep 23 22:07:57.249349 2013] [authz_core:debug] [pid 8599] mod_authz_core.c(802): [client 127.0.0.1:49057] AH01626: authorization result of <RequireAny>: denied
[Mon Sep 23 22:07:57.249361 2013] [authz_core:error] [pid 8599] [client 127.0.0.1:49057] AH01630: client denied by server configuration: /path/to/project/some_file
如果我使用的是“要求全部被授予”,为什么它显示“要求全部被拒绝的结果:被拒绝”?
他们的文件可以被任何用户读取,以防万一我尝试将所有者更改为Apache(www-data)时不走运。另外,默认主机http://localhost
可以正常工作,而phpmyadmin http://localhost/phpmyadmin
也可以正常工作。
我在Internet上找到的所有帮助都是关于用Require替换Order指令。我已经做到了。现在可能是什么问题?