Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30380

Re: How to investigate web script not running?

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <gmx@ross.cx>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'debugging': 0.05; 'subject:How': 0.09; 'sep': 0.09; 'subject:script': 0.09; 'def': 0.10; 'subject:not': 0.11; 'apache': 0.13; 'complains': 0.16; 'gilles': 0.16; 'received:your-server.de': 0.16; 'wrote:': 0.17; 'skip:= 10': 0.20; 'trying': 0.21; 'import': 0.21; 'host': 0.24; 'script': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'skip:[ 10': 0.26; 'charset:iso-8859-15': 0.26; 'skip:# 10': 0.27; 'run': 0.28; 'relies': 0.29; "i'm": 0.29; "skip:' 10": 0.30; 'fri,': 0.30; 'error': 0.30; '+0200,': 0.33; 'to:addr:python-list': 0.33; 'server': 0.35; 'subject:?': 0.35; 'michael': 0.36; 'anything': 0.36; 'unable': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'enable': 0.60; 'your': 0.60; 'first': 0.61; 'request.': 0.64; 'subject:running': 0.84
Content-Type text/plain; charset=iso-8859-15; format=flowed; delsp=yes
To python-list@python.org
Subject Re: How to investigate web script not running?
References <qq2b68p0tl7r2kqc3skdjrpo4qr642e3qd@4ax.com>
Date Fri, 28 Sep 2012 14:16:22 +0200
MIME-Version 1.0
Content-Transfer-Encoding 7bit
From "Michael Ross" <gmx@ross.cx>
In-Reply-To <qq2b68p0tl7r2kqc3skdjrpo4qr642e3qd@4ax.com>
User-Agent Opera Mail/12.02 (Win32)
X-Authenticated-Sender gmx@ross.cx
X-Virus-Scanned Clear (ClamAV 0.97.3/15411/Fri Sep 28 01:42:16 2012)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1549.1348835893.27098.python-list@python.org> (permalink)
Lines 44
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348835893 news.xs4all.nl 6984 [2001:888:2000:d::a6]:59110
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30380

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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