Apache

Build and Install

  • Download mod_wsgi-2.0.tar from http://modwsgi.googlecode.com/.

  • Make sure python, python development packages, gcc, make and apxs (or apxs2) are installed. To install on debian:

    apt-get install gcc g++
    apt-get install make
    apt-get install python-dev
    apt-get install apache2-threaded-dev
    
  • Unzip and configure

    tar xf ../download/python/mod_wsgi-2.0.tar
    ./configure
    
  • Compile

    make
    
  • Install

    make install
    

    On my debian system it says, Libraries have been installed in: /usr/lib/apache2/modules

Configure

  • To /etc/apache2/apache2.conf add:

    LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so
    
  • Re-start apache and check the error log (/var/log/apache2/error.log), you should see a line of the form:

    Apache/2.2.2 (Unix) mod_wsgi/1.0 Python/2.3.5 configured
    

Test

lighttpd etc

Applications written using WSGI can be linked into Apache or lighttpd using http://www.fastcgi.com/: