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 日 · 9088 次点击
    这是一个创建于 4434 天前的主题,其中的信息可能已经有所发展或是发生改变。
    feijilei
        1
    feijilei  
       2013 年 12 月 14 日
    前端走nginx
    b1074549
        2
    b1074549  
       2013 年 12 月 14 日
    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"),
    })
    DonaidTrump
        3
    DonaidTrump  
       2013 年 12 月 15 日
    1楼正解
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2454 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 13:41 · PVG 21:41 · LAX 05:41 · JFK 08:41
    ♥ Do have faith in what you're doing.