I have installed apache and mod_wsgi, and all the web pages are retrieved and displayed, but with NO static files loaded such as css, when I try to access a static file (e.g:http://localhost/static/css/base.css) it says that I don’t have permission to access the file, same goes to media files. So basically the webpage returned is just pure HTML.
I have followed the steps in the presentation slides http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-pycon-sydney-2010.pdf and made the directories accessible to others via chmod o+rx /home/loai/workspace/Faculty
, my httpd.conf part is :
WSGIScriptAlias / /home/loai/workspace/Faculty/Faculty/wsgi.py
WSGIPythonPath /home/loai/workspace/Faculty
Alias /media/ /home/loai/workspace/Faculty/Faculty/media
Alias /static/ /home/loai/workspace/Faculty/Faculty/static
<Directory /home/loai/workspace/Faculty/Faculty/static>
Order deny,allow
Allow from all
</Directory>
<Directory /home/loai/workspace/Faculty/Faculty/media>
Order deny,allow
Allow from all
</Directory>
<Directory /home/loai/workspace/Faculty/Faculty>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
a strange thing is that when I remove the “Files” directive so it becomes:
<Directory /home/loai/workspace/Faculty/Faculty>
Order deny,allow
Allow from all
</Directory>
instead of
<Directory /home/loai/workspace/Faculty/Faculty>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
</Directory>
then trying to access any static or media file raises (not found) instead of permission denied ! but still the pure-html page is loaded !
Try this..if it does try adding the configuration for media directory. Make sure to recursively set read permission on the static folder
Update:
I would suggest copying your static folder outside the faculty application. And I have changed the path in the configuration file.