SSL support in web.py

327 views
Skip to first unread message

alexander lind

unread,
Sep 23, 2009, 1:14:17 PM9/23/09
to we...@googlegroups.com
Hi all

I can't find any reference at all to SSL usage on webpy.org, so can someone here please enlighten me as to the status of SSL support in web.py is right now?

My app will run under lighttpd in production mode which will take care of the SSL needs, but in development mode I use web.py: built-in cherrypy server and it would be handy to be able to use the SSL cert on it as well.

The only reference I could find to SSL in past emails is:

---snip---
BTW, it looks like you have to edit the runsimple method manually in
the httpserver.py source file in order to specify SSL certificate
files. Not a big deal, just pointing that out in case anyone else is
thinking of using this particular combination over https.
---/snip---

Is this still the way to do it?

Thanks
Alec

andrei

unread,
Sep 23, 2009, 2:55:10 PM9/23/09
to web.py
You need to set

from web.wsgiserver import CherryPyWSGIServer

CherryPyWSGIServer.ssl_certificate = "path/to/ssl_certificate"
CherryPyWSGIServer.ssl_private_key = "path/to/ssl_private_key"

alexander lind

unread,
Sep 23, 2009, 5:08:58 PM9/23/09
to we...@googlegroups.com
aha, thanks.

that would be a useful addition to the cookbook, if someone that reads
this happens to have write access to it ..

alec

Chris

unread,
Sep 24, 2009, 8:05:51 AM9/24/09
to web.py
Agreed, please add to cookbook!

Daniel Garcia Moreno

unread,
Sep 24, 2009, 8:49:16 AM9/24/09
to we...@googlegroups.com
El jue, 24-09-2009 a las 05:05 -0700, Chris escribió:
> Agreed, please add to cookbook!

I added it.

http://webpy.org/cookbook/ssl
Reply all
Reply to author
Forward
0 new messages