mod_wsgi is an Apache module that provides a WSGI compliant interface for hosting Python based web applications within Apache. The adapter is written completely in C code against the Apache C runtime and for hosting WSGI applications within Apache. Check out the documentation for more details.
Testing mod_wsgi
Create hello.py file with the code: In apache configuration set:LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias / /path/to/hello.py
Example Django configuration
Here is a configuration for a django project: mysite.wsgi:Benchmarks (very old!)
I've made simple Siege tests for Apache 2.0.59, Python 2.4.4 and mod_python 3.3.1 under AMD64 Gentoo using my site (Django) as the test application. The charts show the results. mod_wsgi is bit faster than mod_python even now. Transaction rate for mod_python and mod_wsgi: 16,79 and 18,63 transactions per second (3 Siege tests, standard deviation: 1,89 and 0,4). Throughput 0,11 and 0,12 MB per second (standard deviation: 0,02 and 0) and average response time: 0,37 and 0,3 seconds (standard deviation: 0,07 and 0,03)





