install ajp-wsgi

build ajp-wsgi from source.The URL:

assume the working directory is ~/pkg

~/pkg>tar jxvf ajp-wsgi-1.0.tar.bz2
~/pkg/ajp-wsgi-1.0>cp -a ajp-wsgi /usr/local/bin


assume your django project installed at ~/mydjapp, or /home/myname/mydjapp

from django.core.handlers.wsgi import WSGIHandler
app = WSGIHandler()

source of the above (in Japanese)

startup ajp-wsgi

~/mydjapp>export DJANGO_SETTINGS_MODULE=settings   <---- this refer /home/myname/mydjapp/
~/mydjapp>export PYTHONPATH=/usr/local/lib/python2.4/site-packages/apps:/home/myname
~/mydjapp>ajp-wsgi run_ajp app /abc

Note: the above PYTHONPATH setting is just an example. It is “any additional directories to search for Python modules” (from It is depended on your django app.

litespeed setting

define an external app(type:“Servlet Engine”),address, either server level or vHost level.

create a vhost “Servlet” context, URI is “/abc”, select above external app as “Servlet Engine”

then access the django app through

  • Admin
  • Last modified: 2015/07/29 15:00
  • by Michael Alegre