Personal tools
You are here: Home Plone XP leocornus.django.ploneproxy integrate django app into httpd, mod_wsgi

integrate django app into httpd, mod_wsgi

— filed under: , , ,

Try to run django application in Apache HTTPD server.

mod_wsgi is the better way for this.

mod_wsgi installation and configuration

Have to specify the --with-apxs and --with-python

$ ./configure --with-apxs=/path/to/apache/bin/apxs \
              --with-python=/path/to/python/bin/python 

mod_wsgi configuration in httpd.conf for my first django application

LoadModule wsgi_module modules/mod_wsgi.so

WSGIDaemonProcess first user=xchen group=xchen \
python-path=/usr/local/rd/python-2.4.6/lib/python2.4/site-packages \
processes=2 threads=15 WSGIProcessGroup first Alias /media/ /usr/local/rd/django/playground/first/media/ <Directory /usr/local/rd/django/playground/first/media> Order deny,allow Allow from all </Directory> WSGIScriptAlias / /usr/local/rd/django/playground/first/django.wsgi <Directory /usr/local/rd/django/playground/first> Order deny,allow Allow from all
</Directory>

The media folder is copied from django/contrib/admin/media.

The following links explain how to use WSGIDaemonProcess:

There is also another directive WSGIPythonPath to specify the python path for mod_wsgi

Authentication Provider on mod_wsgi

http://code.google.com/p/modwsgi/wiki/AccessControlMechanisms

The directive WSGIAuthUserScript. ???

 

 

References

 

Tracking History

When Who What Done
2010-05-12 05:44 Sean Chen mod_wsgi is pretty strait forward and has better performance than mod_python. But it could not provide cookie authentication other then Basic and Digest authentication. So we might use it for some other purpose!
-- 3.0 Hours, 85.0% Done
Document Actions