The Golden Spot

I hope this helps someone who is learning about Linux and web application programming with Python, Django, and Javascript.

Friday, November 07, 2008

Apache 2.2.10
Python 2.6
Django latest from subversion
on Debian Etch ADM64

compiling mod_wsgi, Python 2.6 and Apache 2.2.10 worked for me by configuring Python 2.6 with


then after make and make install:

$ ln -s /usr/local/lib/ /lib

Next, link the python shared object to a place that mod_wsgi will use it.

$ sudo ln -s /usr/local/lib/ /usr/local/lib/python2.6/config/

I compiled Apache successfully by building it with

./configure --with-included-apr --enable-ssl --prefix=/usr/local/apache2 --enable-so

then configure mod_wsgi using

$ ./configure --with-python=/usr/local/bin/python2.6 --with-apxs=/usr/local/apache2/bin/apxs

I checked that the /usr/local/apache2/modules/ was compiled with the python shared object by doing this

$ ldd /usr/local/apache2/modules/

It shows that it was compiled with => /lib/ (0x00002b99a1f1d000) => /lib/ (0x00002b99a21c8000) => /lib/ (0x00002b99a22dd000) => /lib/ (0x00002b99a23e0000) => /lib/ (0x00002b99a24e4000) => /lib/ (0x00002b99a2721000)
/lib64/ (0x0000555555554000)

The test on

worked; So, off to my Django web development.

P.S. Thanks to Graham Dumpleton for help on

from last year when I was trying to get this working with python 2.5 and an older version of Apache. Back then, I never got it to work and ended up using mod_python instead.

Labels: , , , ,


Anonymous Yeago said...


2:35 PM  
Blogger Kevin said...

Excellent job. I've been wrestling with the apache2, mod_wsgi, python2.6 combo all day now. Thank you very much!!!

10:05 PM  

Post a Comment

<< Home