patrickn patrickn - 1 month ago 14
Apache Configuration Question

Django + Apache + mod_wsgi permission denied

I finished the tutorial on Django's site about using

mod_wsgi
(here), and having substituted my paths as appropriate, results in a big fat "Permission denied." when I try to access /. Here is the stuff I added to
httpd.conf
(
mod_wsgi
is enabled earlier in the conf file):

# Django configuration

WSGIScriptAlias / /usr/local/django/billing/apache/django.wsgi

<Directory /usr/local/django/billing/apache/django.wsgi>
Order allow,deny
Allow from all
</Directory>

AliasMatch ^/([^/]*\.css) /usr/local/wsgi/static/styles/$1

Alias /media/ /usr/local/django/billing/media/
Alias /static/ /usr/local/django/billing/static/

<Directory /usr/local/django/billing/static>
Order deny,allow
Allow from all
</Directory>

<Directory /usr/local/django/billing/media>
Order deny,allow
Allow from all
</Directory>


Edit #1:

I've gone through the slides multiple times, from the start: still no joy. Even after opening up the path to the script, chmod'ing every relevant directory to be readable, and chmod'ing the .wsgi script, I still get permission denied. If I change the directory path from
/usr/local/django/billing/apache/django.wsgi
to have the
django.wsgi
truncated, the server returns a configuration error, despite that being how it's configured in the slides.

Answer Source