need help with mod_python in RH 9

Titi Anggono tiang_ono at yahoo.com
Wed Jun 22 00:19:43 EDT 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
</Directory>

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

when I use url
http://192.168.231.3/html/htdocs/mptest.py, 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 
http://football.fantasysports.yahoo.com



More information about the Python-list mailing list