[mod_python] Problem getting mptest.py to work

Jacob Martinson dr.martinson at gmail.com
Thu Dec 30 08:30:59 EST 2004

Hello All,

I'm not a python or apache expert but have set up modpython versions 2
and 3 in the past with varying degrees of success...

mptest.py is generating the "Hello World" message, but apache is
sending a file named "mptest.py" with "hello world" in it, rather than
sending it in a form where the browser will recognize it directly.

Firefox, Internet Explorer and lynx will not display it directly, but
will offer to open it with "less".  Another text browser "links" opens
it directly.

Details of my system:

debian linux (sarge)
apache - 2.0.52 
python - 2.3.4
modpython - 3.1.3 

At the end of my apache2.conf, I have this from the install guide:

<Directory /var/www/py>
   AddHandler mod_python .py
   PythonHandler mptest
   PythonDebug On

The module is getting loaded from a string of config file includes,
but I'm pretty sure it is loading because I get this line in the error

[Thu Dec 30 06:44:00 2004] [notice] mod_python: (Re)importing module 'mptest'

Am I missing something?



More information about the Mod_python mailing list