• <tfoot id='XmWgA'></tfoot>
      • <bdo id='XmWgA'></bdo><ul id='XmWgA'></ul>
      <i id='XmWgA'><tr id='XmWgA'><dt id='XmWgA'><q id='XmWgA'><span id='XmWgA'><b id='XmWgA'><form id='XmWgA'><ins id='XmWgA'></ins><ul id='XmWgA'></ul><sub id='XmWgA'></sub></form><legend id='XmWgA'></legend><bdo id='XmWgA'><pre id='XmWgA'><center id='XmWgA'></center></pre></bdo></b><th id='XmWgA'></th></span></q></dt></tr></i><div id='XmWgA'><tfoot id='XmWgA'></tfoot><dl id='XmWgA'><fieldset id='XmWgA'></fieldset></dl></div>

        <legend id='XmWgA'><style id='XmWgA'><dir id='XmWgA'><q id='XmWgA'></q></dir></style></legend>

        <small id='XmWgA'></small><noframes id='XmWgA'>

      1. Nginx强制http跳转https访问的几种方法

        时间:2023-06-19
          <tbody id='iusTx'></tbody>
            <bdo id='iusTx'></bdo><ul id='iusTx'></ul>

            1. <i id='iusTx'><tr id='iusTx'><dt id='iusTx'><q id='iusTx'><span id='iusTx'><b id='iusTx'><form id='iusTx'><ins id='iusTx'></ins><ul id='iusTx'></ul><sub id='iusTx'></sub></form><legend id='iusTx'></legend><bdo id='iusTx'><pre id='iusTx'><center id='iusTx'></center></pre></bdo></b><th id='iusTx'></th></span></q></dt></tr></i><div id='iusTx'><tfoot id='iusTx'></tfoot><dl id='iusTx'><fieldset id='iusTx'></fieldset></dl></div>

              <small id='iusTx'></small><noframes id='iusTx'>

                  <legend id='iusTx'><style id='iusTx'><dir id='iusTx'><q id='iusTx'></q></dir></style></legend>
                1. <tfoot id='iusTx'></tfoot>
                  Nginx让http的链接自动跳转到https的链接,其实方法还是蛮多的,下面介绍两种常用方法。

                  方法一

                  可以把所有的HTTP请求通过rewrite重写到HTTPS上

                  server{
                     listen 80;
                     server_name XXXXX.com;  //你的域名
                     //rewrite ^(.*)$  https://XXXXXX.com permanent;  
                     rewrite ^(.*)$  https://$host$1 permanent;    
                     location ~ / {
                     index index.html index.php index.htm;
                  }
                  }

                  方法二

                  采用301重定向的方式
                  server{
                     listen 80;
                     server_name XXXXX.com;  //你的域名
                     return 301 https://$server_name$request_uri;
                     location ~ / {
                     index index.html index.php index.htm;
                  }
                  }
                   
                  上一篇:服务器CPU间歇性跑满达到100%如何处理 下一篇:没有了

                  相关文章

                  <tfoot id='8YqFf'></tfoot>
                  • <bdo id='8YqFf'></bdo><ul id='8YqFf'></ul>
                2. <i id='8YqFf'><tr id='8YqFf'><dt id='8YqFf'><q id='8YqFf'><span id='8YqFf'><b id='8YqFf'><form id='8YqFf'><ins id='8YqFf'></ins><ul id='8YqFf'></ul><sub id='8YqFf'></sub></form><legend id='8YqFf'></legend><bdo id='8YqFf'><pre id='8YqFf'><center id='8YqFf'></center></pre></bdo></b><th id='8YqFf'></th></span></q></dt></tr></i><div id='8YqFf'><tfoot id='8YqFf'></tfoot><dl id='8YqFf'><fieldset id='8YqFf'></fieldset></dl></div>

                    <small id='8YqFf'></small><noframes id='8YqFf'>

                      <legend id='8YqFf'><style id='8YqFf'><dir id='8YqFf'><q id='8YqFf'></q></dir></style></legend>