Hi folks,
I have a WSGI app that I would like to place behind SSL. My WSGI server is gevent.
What would a good way to serve the app through SSL in this case be?
Hi folks,
I have a WSGI app that I would like to place behind SSL. My WSGI server is gevent.
What would a good way to serve the app through SSL in this case be?
It looks like gevent now an ssl module. If you have a web server implemented on top of gevent, I imagine you could modify it to wrap incoming connections with that module's ssl socket class before passing it on to the http handlers.
http://blog.gevent.org/2010/02/05/version-0-12-0-released/
http://www.gevent.org/gevent.ssl.html
Otherwise, you could always use good old apache + mod_wsgi to serve your wsgi app.
The gevent.wsgi module does not have built-in SSL support. If you're using it, put it behind nginx which would receive request over HTTPS but proxy them to your gevent app using non-encrypted HTTP.
The gevent.pywsgi module does have built-in SSL support and has compatible interface. Set keyfile
and certfile
arguments to make the server use SSL. Here's an example: wsgiserver_ssl.py.