[mod_python] Cant get modPython working

Graeme Matthew graeme_matthew at hotmail.com
Tue Mar 18 23:05:21 EST 2003

Hi all, im pulling out my 7pm brown hair that is now almost grey !!!!!

I have followed the instructions to get mod_python working on Win32 (XP)

I have edited my conf file as follows:

LoadModule python_module modules/mod_python.so

#added handler directives in scriptalias
<Directory "C:/Program Files/Apache Group/Apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    AddHandler python-program .py
    PythonHandler mptest
    PythonDebug On

I have placed mptest.py in my cgi-bin folder it contains the following:

from mod_python import apache

def handler(req):
    req.write("Content-type: text/html\n\nHello World!")
    return apache.OK

I keep on getting a HTTP 500 Internal Server Error and cant understand why 
as the log file does not seem to contain the error.

Any help would be much appreciated



MSN Instant Messenger now available on Australian mobile phones. Go to  

More information about the Mod_python mailing list