I appear to possess a problem implementing django with mod_wsgi. Previously I have used mod_python but I wish to result in the change. I've been using Graham Dumpleton notes here http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango1, however it still appear not to work. I recieve a Internal Server Error.

django.wsgi file:

import os
import sys


os.environ['DJANGO_SETTINGS_MODULE'] = 'c2duo_crm.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

WSGIScriptAlias / /var/www/html/c2duo_crm/apache/django.wsgi

Apache httpd file:

<Directory /var/www/html/c2duo_crm/apache>
Order allow,deny
Allow from all

During my apache error log, it states I've this error This isn't everything, but I have got the most crucial part:

[Errno 13] Permission denied: '/.python-eggs'
[Thu Mar 03 14:59:25 2011] [error] [client]
[Thu Mar 03 14:59:25 2011] [error] [client] The Python egg cache directory is currently set to:
[Thu Mar 03 14:59:25 2011] [error] [client]
[Thu Mar 03 14:59:25 2011] [error] [client]   /.python-eggs
[Thu Mar 03 14:59:25 2011] [error] [client]
[Thu Mar 03 14:59:25 2011] [error] [client] Perhaps your account does not have write access to this directory?  You can
[Thu Mar 03 14:59:25 2011] [error] [client] change the cache directory by setting the PYTHON_EGG_CACHE environment
[Thu Mar 03 14:59:25 2011] [error] [client] variable to point to an accessible directory.

Python Eggs are module files which are contained within zip files. The Python Egg Cache may be the directory where Python extracts them therefore it can run them. Presently you are attempting to extract these to /.python-eggs but you do not have write use of either that directory, in order to / whether it does not exist.

You've two options, you may either create /.python-eggs making it world writable (or at best writable through the user Apache is running as), or set PYTHON_EGG_CACHE (while using WSGIPythonEggs directive) to some directory where you have write access.

# Avoid [Errno 13] Permission denied: '/var/www/.python-eggs' messages
import os

os.environ['PYTHON_EGG_CACHE'] = '/tmp'