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: 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: Date: Fri, 28 Sep 2012 14:16:22 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Michael Ross" In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Fri, 28 Sep 2012 13:37:36 +0200, Gilles 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