Hello,
I've searched a lot but I still have a problem with the static files (css, image,...) with my django website.
I'm using mod_wsgi with apache on archlinux 64bits
I've added it in my http.conf :
LoadModule wsgi_module modules/mod_wsgi.so
<VirtualHost *:80>
WSGIDaemonProcess mart.localhost user=mart group=users processes=2 threads=25
WSGIProcessGroup mart.localhost
LogLevel debug
Alias /media /home/mart/programmation/python/django/martfiles/media/
<Directory /home/mart/programmation/python/django/martfiles/>
Order allow,deny
Allow from all
</Directory>
WSGIScriptAlias / /srv/http/wsgi-scripts/django.wsgi
</VirtualHost>
I tried to use the django.wsgi in my home folder but it doesn't work (permission denied to access /
) (strangely it works if I use the test script given here)
all the directories and content (apache folder, wsgi-script, martfiles) have the permission 775 root:devusers
with the group devusers including my user, http and root
in my template base.html, I call the css this way :
<html> <head>
<link rel="stylesheet" href="/media/css/style.css" />
and the error in /var/log/http/error.log
[Sat Jan 16 13:22:21 2010] [error] [client 127.0.0.1] (13)Permission denied: access to /media/css/style.css denied, referer: http://localhost/
[Sat Jan 16 13:22:21 2010] [info] mod_wsgi (pid=14783): Attach interpreter ''
/srv/http/wsgi-script/django.wsgi
/home/.../martfiles/settings.py
thank you
edit : I precise that my django website is working fine (except the sessions but I don't think it's related) so I'm not sure it's related to the django.wsgi file (maybe I'm wrong) but what is sure is that I should be able to use the django.wsgi from outside the apache folder
if I change the line Alias /media /home/mart/programmation/python/django/martfiles/media/
with Alias /media /srv/http/media/
and gives the right permissions, it works. But I don't want (and shouldn't) to put all my media in the apache folder