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

为什么全站 HTTP 转 HTTPS 慢的不行, 每次打开网站要一分钟,才跳转!~~~~

  •  
  •   hanjunlei · Apr 3, 2018 · 3280 views
    This topic created in 2958 days ago, the information mentioned may be changed or developed.

    server { listen 80; server_name www.fengyibbk.com; rewrite ^ https://$http_host$request_uri? permanent; # force redirect http to https #return 301 https://$http_host$request_uri; }

    每次打开网站要一分钟,才跳转!~~~~
    
    什么问题。。。。。。。。。。。。
    
    5 replies    2018-04-04 06:15:54 +08:00
    hanjunlei
        1
    hanjunlei  
    OP
       Apr 3, 2018
    取消跳转后访问很快!~~
    torbrowserbridge
        2
    torbrowserbridge  
       Apr 3, 2018
    http 跳 https ?直接访问 https 速度呢?
    yytsjq
        3
    yytsjq  
       Apr 3, 2018
    那条 rewrite 规则没必要吧。。

    server {
    listen 80 default_server;
    listen [::]:80 default_server;

    # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
    return 301 https://$host$request_uri;
    }

    https://mozilla.github.io/server-side-tls/ssl-config-generator/
    hanjunlei
        4
    hanjunlei  
    OP
       Apr 3, 2018
    不跳转很快的。
    msg7086
        5
    msg7086  
       Apr 4, 2018
    请把这一分钟里浏览器的请求和时间分片信息贴出来。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3144 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 03:16 · PVG 11:16 · LAX 20:16 · JFK 23:16
    ♥ Do have faith in what you're doing.