simples setup for an wsgi https server in python

Jean-Paul Calderone exarkun at twistedmatrix.com
Sat Jul 10 15:21:43 EDT 2010


On Jul 10, 2:42 pm, Gelonida <gelon... at gmail.com> wrote:
> Hi,
>
> I'd like to debug a small wsgi module.
>
> I run it either on an apache web server
>
> or locally via wsgiref.simple_server.make_server
> and following code snippet:
>
> from wsgiref.simple_server import make_server
> httpd = make_server('localhost',8012,application)
> while True:
>    httpd.handle_request()
>    print_some_debug_info()
>
> It seems, that wsgiref.simple_server.make_server can only create an http
> server.
>
> What I wondered would be how to easiest create an https server, that
> supports wsgi modules
>
> TIA

You could do this with Twisted:

    twistd -n web --https 443 --certificate server.pem --privkey
server.key --wsgi your.application

Jean-Paul



More information about the Python-list mailing list