On Fri, 28 Sep 2012 13:37:36 +0200, Gilles <nos...@nospam.com> wrote:

Hello

I'm trying to run my very first FastCGI script on an Apache shared
host that relies on mod_fcgid:
==============
#!/usr/bin/python
from fcgi import WSGIServer
import cgitb

# enable debugging
cgitb.enable()

def myapp(environ, start_response):
        start_response('200 OK', [('Content-Type', 'text/plain')])
        return ['Hello World!\n']

WSGIServer(myapp).run()
==============

After following a tutorial, Apache complains with the following when I
call my script:
==============
Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.
==============


Do it the other way around:

# cgitb before anything else
import cgitb
cgitb.enable()

# so this error will be caught
from fcgi import WSGIServer



Regards,
Michael
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to