I recently use django and mod_wsgi on Apache.
I follow the following steps on a webpage:
"My application is in / mnt / www /, the name of the called mysite, apache and created in the mysite media directory, and then do the following:"
create the apache_django_wsgi.conf file as follows:
Alias / site_media / / mnt / www / mysite / media / <Directory /mnt/www/mysite/media> Order allow, deny Options Indexes Allow from all IndexOptions FancyIndexing </ Directory> Alias / media / / usr/local/lib/python2.5/site-packages/django/contrib/admin/media / <Directory /usr/local/lib/python2.5/site-packages/django/contrib/admin/media> Order allow, deny Options Indexes Allow from all IndexOptions FancyIndexing </ Directory> WSGIScriptAlias / / mnt / www / mysite / apache / django.wsgi <Directory /mnt/www/mysite> Order deny, allow Allow from all </ Directory> <Directory /mnt/www/mysite/apache> Allow from all </ Directory>
create the django.wsgi file as follows:
import os, sys
I followed this step, but when I run it under Apache through a browser, I get 500 Internet Server Error. Then I check erro_log: it says: "TemplateSyntaxError: Caught ImportError when rendering: there is no module named friends" (friends is the name of one of my modules)
My site path is / var / BigPrject / mysite
source share