Apache2/mod python

This module provides support for Python to do CGIs. It contains an embedded Python interpreter which allows access to Apache internals.

The documentation, which is heavily borrowed from to make this Wiki page, can be found at modpython.org.

Installation
The package is what should be emerged in order to install:

Edit /etc/conf.d/apache2 by appending "-D PYTHON" to the APACHE2_OPTS global variable

Testing
To verify that mod_python is working, we will test it with a simple script. "Hello World!" to the rescue.

Add the following Apache directives

Create simple "Hello World" application

Restart apache

Open the url http://localhost/mptest.py/handler.