[mod_python] Problem with config

Jimmie Houchin jhouchin at cableone.net
Tue Apr 13 22:43:51 EST 2004


Hello,

I am trying to give mod_python at try.

I am running Gentoo Linux. Apache outputs this on an error page.
This is just info not the problem.
Apache/2.0.49 (Gentoo/Linux) mod_python/3.1.3 Python/2.3.3 mod_scgi/1.1 
Server at localhost Port 80

I have mptest.py as:

from mod_python import apache

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

mod_python part of my apache2.conf file

<Directory /var/www/python>
	AddHandler mod_python .py
	PythonHandler mptest
	PythonDebug On
</Directory>

When I go to http://localhost/python/mptest.py
It simply reads the file giving me the text of the file instead of 
executing the file and giving me "Hello World!".

I know I am probably doing some stupid newbie trick.
I have looked and looked through list archives.

Any help greatly appreciated.

Jimmie Houchin


More information about the Mod_python mailing list