PHP Apache 2.4 403 Forbidden 解决

阅读(5029)

apache 2.4,启用vhost,配置后提示403 Forbidden。

查看error_log:

client denied by server configuration

文件访问权限检查也是OK的。

原因在于2.4 升级后,权限允许的语法变了!

不要使用下面的配置方式(Apache 2.2):
Order deny,allow
Deny from all

Apache 2.4 使用:

Require all denied

via: http://httpd.apache.org/docs/2.4/upgrading.html#access

Tags: apache