Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30380
| Subject | Re: How to investigate web script not running? |
|---|---|
| References | <qq2b68p0tl7r2kqc3skdjrpo4qr642e3qd@4ax.com> |
| Date | 2012-09-28 14:16 +0200 |
| From | "Michael Ross" <gmx@ross.cx> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1549.1348835893.27098.python-list@python.org> (permalink) |
On Fri, 28 Sep 2012 13:37:36 +0200, Gilles <nospam@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to investigate web script not running? Gilles <nospam@nospam.com> - 2012-09-28 13:37 +0200
Re: How to investigate web script not running? Gilles <nospam@nospam.com> - 2012-09-28 14:13 +0200
Re: How to investigate web script not running? "Michael Ross" <gmx@ross.cx> - 2012-09-28 14:16 +0200
Re: How to investigate web script not running? Gilles <nospam@nospam.com> - 2012-09-28 15:15 +0200
Re: How to investigate web script not running? Ramchandra Apte <maniandram01@gmail.com> - 2012-09-29 10:05 -0700
Re: How to investigate web script not running? Gilles <nospam@nospam.com> - 2012-09-30 11:55 +0200
csiph-web