[mod_python] can't get a simple hello world program to work

Tom van de Zande tomvandezande at gmail.com
Wed Oct 20 13:47:12 EDT 2004


Hi guys,

For some reason I can't get a simple hello world program to work.
Apache offers mptest.py as download in stead of interpreting it.
I installed apache2 and the latest version of mod_python using apt
(Debian Sarge)

i'm testing following the description at:
http://www.modpython.org/live/current/doc-html/inst-testing.html

apache config:
<Directory /var/www/test>
    AddHandler mod_python .py
    PythonHandler mptest
    PythonDebug On
</Directory>

/var/www/test/mptest.py:
from mod_python import apache

def handler(req):
    req.write("Hello World!")
    return apache.OK

apache error.log says:
[Wed Oct 20 19:22:50 2004] [notice] Apache/2.0.52 (Debian GNU/Linux)
mod_python/3.1.3 Python/2.3.4 configured -- resuming normal operations
[Wed Oct 20 19:23:04 2004] [notice] mod_python: (Re)importing module 'mptest'

Thanks in advance.  Any help on this is highly appreciated.

Tom.


More information about the Mod_python mailing list