need help with mod_python in RH 9

Titi Anggono tiang_ono at
Wed Jun 22 06:19:43 CEST 2005

Hi all,

I use apache2.0, mod_python 3.0, and python2.2.2. In
/etc/httpd/conf.d/python.conf, I added following (as I
read in the manual)

<Directory /var/www/html/htdocs>
AddHandler python-program .py
PythonHandler mptest
PythonDebug On

and create under directory
/var/www/html/htdocs, (as I read in the manual)
from mod_python import apache
def handler(req):
  req.write("Hello World!")
  return apache.OK

when I use url, I get the
code listing. Apache doesn't execute the file.

Could somebody tell me how to tell apache to execute
the code.

Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football

More information about the Python-list mailing list