[mod_python] config help

Jay Dorsey jay at jaydorsey.com
Fri Dec 12 09:42:34 EST 2003


On Thu, Dec 11, 2003 at 11:26:57AM -0600, Jason Tesser wrote:
> I have the folowing script saved as test.py under htdocs.
> 
> from mod_python import apache
> 
> def handler(req):
> 	req.write("Hello World!")
> 	return apache.OK
>

This looks fine

> I cannot get it to execute properly with mod_python.  Here the configuration from my apache config file.
> 
> <Directory /srv/www/htdocs/>
>   AddHandler python-program .py
>   PythonHandler test
>   #PythonHandler mod_python.publisher
>   PythonDebug On
> </Directory>

So does this, except for maybe that trailing slash on htdocs (I don't
have one in my setup, not sure if its required, disallowed, or 
allowed though).  Are you sure your restarted apache after you made the 
changes to your config file?  Have you checked the apache error logs
to see if you're getting any messages there?  Are you sure you're 
serving pages out of /srv/www/htdocs?  

-- 
Jay Dorsey
jay at jaydorsey dot com


More information about the Mod_python mailing list