How to investigate web script not running?

Michael Ross gmx at ross.cx
Fri Sep 28 08:16:22 EDT 2012


On Fri, 28 Sep 2012 13:37:36 +0200, Gilles <nospam at 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



More information about the Python-list mailing list