mod_wsgi, Python 2.6, and RHEL 5

March 16, 2012 by
Filed under: Uncategorized 

To get mod_wsgi working with python26 on RHEL 5,
yum install python26-mod-python

Then in httpd.conf, instead of
LoadModule wsgi_module modules/

LoadModule wsgi_module modules/

elsewhere in httpd.conf, you van have:
WSGIScriptAlias /projbase /var/lib/django/projbase.wsgi

with /var/lib/django/projbase.wsgi


import os
import sys

sys.path = ['/var/www/', '/usr/lib64/python2.6'] + sys.path
from django.core.handlers.wsgi import WSGIHandler

os.environ['DJANGO_SETTINGS_MODULE'] = 'pytest.settings'
application = WSGIHandler()


Tell me what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!