Skip to content
Browse files

The script in the cookbook did not work for me. After many hours of s…

…ifting through source, I came up with this way.
  • Loading branch information...
1 parent f9592ff commit 65021436d1f1080b982e18ee251377963219cb64 @jordanperr jordanperr committed Jan 12, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 cookbook/ssl.md
View
9 cookbook/ssl.md
@@ -14,11 +14,14 @@ How to set SSL support in built-in cherrypy server web.py
## Solution
import web
-
from web.wsgiserver import CherryPyWSGIServer
+ from web.wsgiserver.ssl_builtin import BuiltinSSLAdapter
+
+ ssl_cert = "path/to/ssl_certificate"
+ ssl_key = "path/to/ssl_private_key"
+
+ CherryPyWSGIServer.ssl_adapter = BuiltinSSLAdapter(ssl_cert,ssl_key,None)
- CherryPyWSGIServer.ssl_certificate = "path/to/ssl_certificate"
- CherryPyWSGIServer.ssl_private_key = "path/to/ssl_private_key"
urls = ("/.*", "hello")
app = web.application(urls, globals())

0 comments on commit 6502143

Please sign in to comment.
Something went wrong with that request. Please try again.