Monday, November 1, 2010

Mod_Python and everything loaded, Apache serving HTML files without using Django first

I've finally got mod_python and mysqldb working with apache (long
story short, can't install wsgi for various reasons and i'm using
python 2.4.3... for various reasons...).

However

Now when i load up the home page (just typing 'localhost' into
firefox) i get the literal HTML representation of index.html, without
the dynamics filling in. I can only assume that apache is not using
Django to return these requests.

I only have 1 Virtual Host and Location tag in my entire Apache
Configuration File (with all the standard stuff, i didn't turn
anything off):

LoadModule python_module /usr/lib64/httpd/modules/mod_python.so

<VirtualHost "localhost">
ServerName Sweetman
ServerAdmin Sweetman@sweetman.com
DocumentRoot /srv/www/sweetman/

<Location "/sweetman/">
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE sweetman.settings
PythonDebug On
PythonPath "[ '/sweetman_live/sweetman' , '/usr/lib/
python2.4/site-packages/django/' , '/srv/www/'] + sys.path"
</Location>

<Location "/site_media/">
SetHandler none
</Location>

ErrorLog /srv/www/sweetman/logs/error.log
CustomLog /srv/www/sweetman/logs/access.log combined
</VirtualHost>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment