V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
danube533
V2EX  ›  问与答

nginx 里如何配置,使 xp 系统的用户访问 http,win7 以上用户访问 https

  •  
  •   danube533 · Nov 13, 2014 · 3521 views
    This topic created in 4189 days ago, the information mentioned may be changed or developed.
    由于xp不支持sni,果断放弃https访问...
    6 replies    2014-11-13 15:00:43 +08:00
    blijf
        1
    blijf  
       Nov 13, 2014
    用的cloudflare SSL
    之前也有考虑过,不过由于自己博客 ,没所谓了
    USERAGENT不知道行不行
    extreme
        2
    extreme  
       Nov 13, 2014
    为什么Windowd XP不支持SNI?
    Windows XP也不会落后到HTTP请求不带hosts吧。
    支不支持SNI目前主要取决于HTTP Server了,Nginx不就是通过HTTP请求头中host的内容判断用哪个站点SSL证书的吗?
    47jm9ozp
        3
    47jm9ozp  
       Nov 13, 2014
    @extreme google一下你就知道
    extreme
        4
    extreme  
       Nov 13, 2014
    @ooxxcc 之前用Windows XP,开始自己开网站前就没用IE了,不太了解。
    可以用正则表达式判断一下$http_user_agent。
    47jm9ozp
        5
    47jm9ozp  
       Nov 13, 2014
    @extreme 支不支持SNI目前主要取决于HTTP Server了//这句有误 No support for any Internet Explorer version on Windows XP because SNI depends on the SChannel system component shipped with Windows Vista.[7]

    ref http://en.wikipedia.org/wiki/Server_Name_Indication

    LZ的情况所有访问默认http,然后判断一下useragent再跳转就好了
    orzfly
        6
    orzfly  
       Nov 13, 2014
    不过,默认访问 HTTP 小心 HTTPStrip 啊……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2505 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 06:36 · PVG 14:36 · LAX 23:36 · JFK 02:36
    ♥ Do have faith in what you're doing.