Yesterday I tried to add mod_python 3.3.1 to my Apache 2 installation on Ubuntu.

After a download of the mod_python source, the source needs to be configured against the apache extension tool (apxs) like so:

./configure --with-apxs=/the/path/to/apache/bin/apxs

Configure went fine. The problem started after make, that ended with the dreaded:

Command failed with rc=65536

No effort to compile after that worked. Until I found this blog. It suggests that I should download the source from SVN trunk instead like so:

svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk

After that make and sudo make install went fine. I guess that some patch is not included in the official source download.

Add to httpd.conf:

LoadModule python_module  modules/mod_python.so

Apache now does Python as well.

Note: If you’re installing on a standard installation of Apache 2 on Debian or Ubuntu, then you only need to:

sudo apt-get install libapache2-mod-python

My apache 2 is not a standard installation though so I had to roll my own installation.