httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian Munroe" <>
Subject Re: [users@httpd] Testing Python Mod
Date Fri, 31 Aug 2007 16:32:20 GMT
On 8/31/07, Chris Howell <> wrote:

>  AddHandler python-program .py
>  PythonHandler mptest
>  PythonDebug On


I would suggest you use the Publisher mod_python handler, at least to
get started.

Here is a simple hello, world in mod_python.  I assume you fixed your
other problem with mod_python from yesterday?  Let me guess, reinstall
everything? :)

In my httpd.conf file, in a global scope.

LoadModule python_module modules/
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On

Then inside of my DocumentRoot (default is htdocs), I have a file
called that looks like:

def world(req):
	return "hello, world"

Then finally, I access it via:


which renders "hello, world" in plain text to the browser.

-- brian

PS.  Don't cross-post to lists, you are going to get flamed by the moderators!

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message