I upgraded a copy of apache that was being used in work earlier and I ran in to some errors that were quite puzzling.
Every time I went to access the site, I was shown an error in the logs that read:
[authz_core:error] [pid 26128:tid 2964360000] [client <IPADDRESS>:49688] AH01630: client denied by server configuration: /path/to/file.wsgi
Nothing had changed in the application so after consulting the great google, I found out that
mod_authz_core
was introduced in Apache2.3. This changes the way that access control is declared from Order allow, deny
Allow from all
to :
Require all granted
This means that the total configuration for a
Directory
is now something like: <Directory /path/to/directory>
Options FollowSymlinks
AllowOverride none
Require all granted
</Directory>
Restart apache and it'll all work nicely.
这个在apache2.4的版本中会出现该问题,因为默认的配置一般为
回复删除Order allow, deny
Allow from all
而在2.4版本中就需要改为
Require all granted