V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Tornado Documentation
http://www.v2ex.com/tornado/
Tornado on GitHub
https://github.com/facebook/tornado/
Tornado Gists
http://tornadogists.org/
kenneth
V2EX  ›  Tornado

如何让Tornado网站同时支持http和https两种协议访问?

  •  
  •   kenneth · 2013-12-14 16:59:11 +08:00 · 8380 次点击
    这是一个创建于 3757 天前的主题,其中的信息可能已经有所发展或是发生改变。
    feijilei
        1
    feijilei  
       2013-12-14 21:50:51 +08:00
    前端走nginx
    b1074549
        2
    b1074549  
       2013-12-14 23:29:47 +08:00
    To make this server serve SSL traffic, send the ssl_options dictionary argument with the arguments required for the ssl.wrap_socket method, including certfile and keyfile. (In Python 3.2+ you can pass an ssl.SSLContext object instead of a dict):

    HTTPServer(applicaton, ssl_options={
    "certfile": os.path.join(data_dir, "mydomain.crt"),
    "keyfile": os.path.join(data_dir, "mydomain.key"),
    })
    tulongtou
        3
    tulongtou  
       2013-12-15 16:24:04 +08:00
    1楼正解
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3294 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 13:50 · PVG 21:50 · LAX 06:50 · JFK 09:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.