[mod_python] mod_python tutorial issues

Joseph Sliz jsliz at fluentenergy.com
Mon Mar 17 10:26:46 EDT 2008

I am new to mod_python and Apache.


My environment is:
Windows XP Prof sp2
Python 2.4
Apache 2.2.8
Mod_python 3.3.1
I've already added the following to the Apache httpd.conf
LoadModule python_module modules/mod_python.so
I'm now trying to do a simple test, following a tutorial I found.  I've also
added the following to the Apache httpd.conf file to let Mod_python know
where to find my python module
DocumentRoot /C:/temp
<Directory /C:/temp>
    AddHandler python-program .py 
    PythonHandler hello
I have added the following python script to my "C:/temp" directory.
from mod_python import apache
def handler(req):
     req.content_type = "text/plain"
     req.write("Hello, Welcome to my World!")
     return apache.OK
When I put the request "http://localhost/hello.py" into my browser, I
receive an "HTTP 404 Not Found" error.  Can anyone please give me some
assistance as to what I might be doing wrong??




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080317/2fcad5ce/attachment.html

More information about the Mod_python mailing list