Install Mod Python for Apache!

Install module

sudo apt-get install libapache2-mod-python

Add python directives to /etc/apache2/sites-enabled/000-default

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>

Restart apache.

sudo /etc/init.d/apache2 restart

Create test page:

def index(req):
return "donkey";

Bingo!

Leave a Reply