Set up Django, Apache and mod_wsgi on Debian 6 (Squeeze), per this guide:
http://library.linode.com/frameworks/dj ... -6-squeezeKeep getting "500 Internal Server Error"
And this is what error-log looks like:
---
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] mod_wsgi (pid=5742): Exception occurred processing WSGI script '/srv/www/klkds.com/application/django.wsgi'.
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] Traceback (most recent call last):
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] File "/usr/local/lib/python2.6/dist-packages/Django-1.4.3-py2.6.egg/django/core/handlers/wsgi.py", line 219, in __call__
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] self.load_middleware()
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] File "/usr/local/lib/python2.6/dist-packages/Django-1.4.3-py2.6.egg/django/core/handlers/base.py", line 39, in load_middleware
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] for middleware_path in settings.MIDDLEWARE_CLASSES:
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] File "/usr/local/lib/python2.6/dist-packages/Django-1.4.3-py2.6.egg/django/utils/functional.py", line 184, in inner
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] self._setup()
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] File "/usr/local/lib/python2.6/dist-packages/Django-1.4.3-py2.6.egg/django/conf/__init__.py", line 42, in _setup
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] self._wrapped = Settings(settings_module)
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] File "/usr/local/lib/python2.6/dist-packages/Django-1.4.3-py2.6.egg/django/conf/__init__.py", line 95, in __init__
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
[Thu Dec 20 03:32:11 2012] [error] [client 99.113.35.235] ImportError: Could not import settings 'settings' (Is it on sys.path?): No module named settings
---
My Django application is in folder: /srv/www/klkds.com/application/
This is what django.wsgi file looks like (saved in: /srv/www/klkds.com/application/django.wsgi):
---
import os
import sys
sys.path.append('/srv/www/klkds.com/application')
sys.path.append('/srv/www/klkds.com/')
os.environ['PYTHON_EGG_CACHE'] = '/srv/www/klkds.com/.python-egg'
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
---
Am I supposed to set the path for DJANGO_SETTINGS_MODULE to my settings.py file? It's located at: /srv/www/klkds.com/application/application/settings.py
Help much appreciated!