[mod_python] setup problem - apache not recognizing python script

John Cartwright John.C.Cartwright at noaa.gov
Thu Jun 15 12:24:13 EDT 2006


Hello All,

for some reason apache is not recognizing my python handler, returning
only the text of the python program.  Can someone please tell me what's
wrong in my configuration below:

alias /python "/mnt/data1/htdocs/python"
<Directory /data1/htdocs/python>
  SetHandler python-program
  PythonPath "sys.path+['/mnt/data1/htdocs/python']"
  PythonHandler mptest
  PythonDebug On
</Directory>



Here's the code for the handler (/data1/htdocs/python/mptest.py):

import mod_python
from mod_python import apache

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

--------------------------------------------------------------------------------------------------------------------------------
This is apache 2.0.46, mod_python 3.0.3, and RHEL WS 4.

Thanks!

-- john



More information about the Mod_python mailing list