I’m debugging a really weird problem with a mod_wsgi-deployed application resulting in Django/Apache (not yet known which) giving status 500 errors to some users instead of the correct 404. I want to exclude Apache from the debugging environment to determine which part of the setup is at fault and send my requests manually to the WSGI handler.
I suspect it’s as easy as setting the environment and running python wsgi_handler.py, but is this correct? What should the enviroment contain additionally? Any pointers to existing documentation?
Correct.
Did you read this? http://docs.python.org/library/wsgiref.html
You can easily run a web server from your desktop for testing. It’s a very few lines of code.
http://docs.python.org/library/wsgiref.html#wsgiref.simple_server.make_server