[Pythonmac-SIG] mod_python

Bob Ippolito bob at redivi.com
Sun Mar 18 20:58:38 CET 2007

On 3/18/07, Dougal Graham <dougalg at gmail.com> wrote:
> Hey, this is actually a mod_python question. I thought it would be OK,
> but if it's inappropriate here, just lmk and I'll try somewhere else!
> Basically, I just installed mod_python 2.7.11 on apache 1.3.33. The
> installation docs suggest creating 2 files to test mod_python. The
> first is a .htaccess file containing:
> AddHandler python-program .py
> PythonHandler mptest
> PythonDebug On
> The second is a test file name mptest.py containing:
> from mod_python import apache
> def handler(req):
>     req.send_http_header()
>     req.write("Hello World!")
>     return apache.OK
> When I try to navigate to this file ( I get a
> 500 internal server error. Any thoughts on what might be causing
> this??

There's a lot of things that can cause mod_python to fail. I would
highly recommend *not* using mod_python at all, ever, unless you
absolutely must have to. Using a standalone (probably WSGI based)
server behind mod_proxy, mod_fcgi, or mod_scgi is a much better
solution 99.9% of the time.


More information about the Pythonmac-SIG mailing list