build ajp-wsgi from source.The URL: http://www.saddi.com/software/ajp-wsgi/
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 run_ajp.py: http://d.hatena.ne.jp/perezvon/20080417/1208445705 (in Japanese)
~/mydjapp>export DJANGO_SETTINGS_MODULE=settings <---- this refer /home/myname/mydjapp/settings.py
~/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 http://www.saddi.com/software/ajp-wsgi/). It is depended on your django app.
define an external app(type:”Servlet Engine”),address 127.0.0.1:8009, 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