Search code examples
djangoapachehttp-status-code-403traceback

django and apache: get traceback of 403 Forbidden


I am developing a web app with Django and apache. I can access the homepage but when I log in I get 403 Forbidden. Where can I get a traceback of the error so I can solve the problem?

I am developing in local so I set DEBUG=True. Here is what I see in the apache log:

[Tue Mar 24 14:12:13.230364 2015] [mpm_event:notice] [pid 3738:tid 139683667068800] AH00493: SIGUSR1 received.  Doing graceful restart
[Tue Mar 24 14:12:13.338989 2015] [mpm_event:notice] [pid 3738:tid 139683667068800] AH00489: Apache/2.4.7 (Ubuntu) OpenSSL/1.0.1f mod_wsgi/3.4 Python/2.7.6 configured -- resuming normal operations
[Tue Mar 24 14:12:13.339010 2015] [core:notice] [pid 3738:tid 139683667068800] AH00094: Command line: '/usr/sbin/apache2'

No trace of the mistake!

EDIT : It doesn't seem to be an apache error, I have the same problem using the django local server:

24/Mar/2015 15:51:28] "POST /accounts/participant_login/?next=/participants/ HTTP/1.1" 200 6286
[24/Mar/2015 15:51:41] "POST /accounts/participant_login/?next=/participants/ HTTP/1.1" 302 0
[24/Mar/2015 15:51:41] "GET /participants/ HTTP/1.1" 403 22

Solution

  • By default, you can check the error under the /var/log/apache2/error.log. Another (less recommended) solution is to set the DEBUG variable to True.