[mod_python] Problem with config

Evert Carton evert_carton at yahoo.co.uk
Wed Apr 14 06:17:30 EST 2004


Wild guessing.
First thing I see lacking here:
PythonPath in the configuration file:

PythonPath "sys.path+['/full/path/to/mptest.py']"
e.g: mptest.py is in /home/myhome/python
then the above line should read
PythonPath "sys.path+['/home/myhome/python']"

Hope this helps.
Evert


On Wed, 2004-04-14 at 05:43, Jimmie Houchin wrote:
> 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
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list