I have got Ubuntu 10.04 (XEN) VPS. I want to set up Django server. I use apt-get to install django packages, apache, apache-mpm-prefork. Before using this configuration I saw "It works!" title, when I use ip/domain to get access to the server. After using configuration I saw:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
I found my django folder in this directory: /usr/local/lib/python2.7/dist-packages/django/ , while using find command to 'django-admin.py' (also, such file at /usr/local/bin) and put there folder from my development computer. So, this is my configuration:
<Location "/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE projectname.settings
PythonDebug Off
PythonAutoReload Off
PythonPath "['/usr/local/lib/python2.7/dist-packages/django','/usr/local/lib/python2.7/sidt-packages/django/bin/projectname'] + sys.path"
</Location>
<Location "/media/">
SetHandler None
</Location>
<Location "/static/">
SetHandler None
</Location>
What is wrong with my configuration? And how can I found information about errors, I can't understand what I must search to fix.
Where's the Django project located? You'll need to point your
PythonPath
at the project, not necessarily the Django library files.It's configured to look in
/usr/local/lib/python2.7/sidt-packages/django/bin/projectname
; that should be "site-packages
" instead, but confirm that that's where the project files are located (is "projectname
" correct?).