Debian – How to make apache give the config file path and line number for a 403 error

apache-2.4debianhttp-status-code-403loggingmod-wsgi

I'm running Apache 2.4.7 on debian unstable. I'm getting 403 errors when I try to run supysonic using the mod_wsgi module. I turned the LogLevel for wsgi and authz_core up to trace6, but I'm still not getting any useful messages. Note that I'm using mod_access_compat, so the Order … Allow combination is valid.

I'd like to see specifically what config file (for instance some .htaccess file somewhere, or one of the standard apache or debian config files) and what line contains the rule that generates a 403 error.

I have manually walked the tree, checking at each level that the user the web server is running as has read permissions for files, and read and execute for directories.

my /etc/apache2/apache.conf file iincludes the line:

LogLevel info authz_core:trace6 wsgi:trace6

The apache config file for supysonic, /etc/apache2/conf-enabled/supysonic.conf is:

WSGIScriptAlias /supysonic /mnt/large_vol/home/bminton/public_html/programs/supysonic
<Directory /mnt/large_vol/home/bminton/public_html/programs/supysonic>
    WSGIApplicationGroup %{GLOBAL}
    Order deny,allow
    Allow from all
</Directory>

The error log contains the following lines:

[Wed Jan 15 08:40:34.106119 2014] [authz_core:debug] [pid 13558] mod_authz_core.c(802): [client 127.0.0.1:58438] AH01626: authorization result of Require all denied: denied [Wed Jan 15 08:40:34.106197 2014] [authz_core:debug] [pid 13558] mod_authz_core.c(802): [client 127.0.0.1:58438] AH01626: authorization result of <RequireAny>: denied [Wed Jan 15 08:40:34.106208 2014] [authz_core:error] [pid 13558] [client 127.0.0.1:58438] AH01630: client denied by server configuration: /mnt/large_vol/home/bminton/public_html/programs/supysonic [Wed Jan 15 08:40:34.113336 2014] [:info] [pid 13571] mod_wsgi (pid=13571): Initializing Python. [Wed Jan 15 08:40:34.154407 2014] [:info] [pid 13571] mod_wsgi (pid=13571): Attach interpreter ''.

Best Answer

A 403 error is related to user authorization, it's not really about you application code.

You said you were using apache version 2.4, then this is certainaly wrong:

Order deny,allow
Allow from all

This should now be written this way (1 line only):

Require all granted
Related Topic