some problems with mod_python
Johan
valpis at gmail.com
Mon Aug 27 16:13:07 EDT 2007
Hi
I have installed and tested this on centos, fedora and freebsd all
give the same problem so I guess I missed some steps.
I have compiled bot apache (2.2.4) and mod_python (3.3.1) according to
the docs and no problem with this.
But when I have made everything about testing mod_python an browse to
http://server/test and there expecting to see "Hello world" I instead
get an index of contents in this directory. If I go to http://server/test/mptest.py
it works. No errors in any log either.
What Have I missed?
This I added to httpd.conf
<Directory /opt/site/htdocs/test>
AllowOverride All
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>
this is my mptest.py:
from mod_python import apache
def handler(req):
req.content_type = 'text/plain'
req.write("Hello World!")
return apache.OK
/johan
More information about the Python-list
mailing list