Quand je suis en train d'exécuter le script Python WSGI pour tester FastCGI de cette tutorial:WSGI adaptateur Python pour tester FastCGI: Erreur lors du démarrage serveur WSGI
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from cgi import escape
import sys, os
from flup.server.fcgi import WSGIServer
def app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/html')])
yield '<h1>FastCGI Environment</h1>'
yield '<table>'
for k, v in sorted(environ.items()):
yield '<tr><th>%s</th><td>%s</td></tr>' % (escape(k), escape(v))
yield '</table>'
WSGIServer(app).run()
Il en résulte suivant, de l'erreur LOGGUE ISN 't effacer ce qui s'est mal passé en fonction de l'état de l'application retourné 0. Il se pourrait que je manque quelque chose.
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/local/lib64/python2.7/site-packages/mod_python/apache.py", line 398, in HandlerDispatch
result = obj(req)
File "/usr/local/lib64/python2.7/site-packages/mod_python/publisher.py", line 213, in handler
module = page_cache[req]
File "/usr/local/lib64/python2.7/site-packages/mod_python/cache.py", line 89, in __getitem__
return self._checkitem(name)[2]
File "/usr/local/lib64/python2.7/site-packages/mod_python/cache.py", line 131, in _checkitem
value = self.build(key, name, opened, entry)
File "/usr/local/lib64/python2.7/site-packages/mod_python/publisher.py", line 86, in build
return ModuleCache.build(self, key, req, opened, entry)
File "/usr/local/lib64/python2.7/site-packages/mod_python/cache.py", line 380, in build
exec(opened_as_str, module.__dict__)
File "<string>", line 21, in <module>
File "/usr/local/lib/python2.7/site-packages/flup/server/fcgi.py", line 112, in run
sock = self._setupSocket()
File "/usr/local/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 997, in _setupSocket
req.run()
File "/usr/local/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 572, in run
self._end(appStatus, protocolStatus)
File "/usr/local/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 601, in _end
sys.exit(appStatus)
SystemExit: 0
Un indice peut être que cela se produit uniquement lorsque je l'exécute via Apache. En ligne de commande, cela fonctionne bien.