{"id":274035,"date":"2024-05-16T13:53:53","date_gmt":"2024-05-16T05:53:53","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/274035.html"},"modified":"2024-05-16T13:54:07","modified_gmt":"2024-05-16T05:54:07","slug":"%e6%8a%8a%e6%89%80%e6%9c%89-https-%e9%a1%b9%e7%9b%ae%e6%97%a0%e8%84%91%e5%8d%87%e7%ba%a7%e6%88%90-http-2-%e4%bc%9a%e6%9c%89%e4%bb%80%e4%b9%88%e5%9d%91%e5%90%97","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/274035.html","title":{"rendered":"\u628a\u6240\u6709 HTTPS \u9879\u76ee\u65e0\u8111\u5347\u7ea7\u6210 HTTP\/2 \u4f1a\u6709\u4ec0\u4e48\u5751\u5417"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24195644\/84b05c55-b9b6-4656-aa3a-5f89f6a3927a.webp\" alt=\"\u628a\u6240\u6709 HTTPS \u9879\u76ee\u65e0\u8111\u5347\u7ea7\u6210 HTTP\/2 \u4f1a\u6709\u4ec0\u4e48\u5751\u5417\" \/><\/p>\n<p><p>\u5c06\u6240\u6709HTTPS\u9879\u76ee\u5347\u7ea7\u5230HTTP\/2\u4f1a\u5e26\u6765\u4e00\u7cfb\u5217\u6539\u8fdb\u548c\u4f18\u52bf\uff0c\u5305\u62ec\u63d0\u9ad8\u7f51\u7ad9\u52a0\u8f7d\u901f\u5ea6\u3001\u4f18\u5316\u8fde\u63a5\u590d\u7528\u3001\u5934\u90e8\u538b\u7f29\u4ee5\u53ca\u670d\u52a1\u5668\u63a8\u9001\u7b49\u3002<strong>\u4f46\u8fd9\u4e00\u8fc7\u7a0b\u4e2d\u4e5f\u4e0d\u4e4f\u6f5c\u5728\u95ee\u9898\uff0c\u5982\u517c\u5bb9\u6027\u95ee\u9898\u3001\u670d\u52a1\u5668\u548c\u5ba2\u6237\u7aef\u914d\u7f6e\u96be\u5ea6\u4ee5\u53ca\u52a0\u5bc6\u9700\u6c42\u7b49<\/strong>\u3002\u5728\u8fd9\u4e9b\u6f5c\u5728\u95ee\u9898\u4e2d\uff0c<strong>\u517c\u5bb9\u6027\u95ee\u9898<\/strong>\u5c24\u5176\u503c\u5f97\u5173\u6ce8\u3002\u867d\u7136\u7edd\u5927\u591a\u6570\u73b0\u4ee3\u6d4f\u89c8\u5668\u90fd\u652f\u6301HTTP\/2\uff0c\u4f46\u4ecd\u6709\u4e00\u4e9b\u8f83\u65e7\u7684\u6d4f\u89c8\u5668\u7248\u672c\u4e0d\u652f\u6301\u6b64\u534f\u8bae\u3002\u5bf9\u4e8e\u90a3\u4e9b\u4f9d\u65e7\u4f7f\u7528\u65e7\u7248\u672c\u6d4f\u89c8\u5668\u7684\u7528\u6237\u6765\u8bf4\uff0c\u5982\u679c\u7f51\u7ad9\u5f3a\u5236\u4f7f\u7528HTTP\/2\uff0c\u5c06\u65e0\u6cd5\u8bbf\u95ee\u7f51\u7ad9\u5185\u5bb9\u3002\u56e0\u6b64\uff0c\u4e3a\u4e86\u4e0d\u6392\u9664\u8fd9\u90e8\u5206\u7528\u6237\uff0c\u7f51\u7ad9\u53ef\u80fd\u9700\u8981\u5b9e\u73b0\u964d\u7ea7\u65b9\u6848\uff0c\u4ee5\u4fbf\u6839\u636e\u5ba2\u6237\u7aef\u652f\u6301\u60c5\u51b5\u9009\u62e9\u5408\u9002\u7684\u4f20\u8f93\u534f\u8bae\uff0c\u4ece\u800c\u589e\u52a0\u4e86\u7f51\u7ad9\u7ef4\u62a4\u7684\u590d\u6742\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001HTTP\/2 \u7684\u4e3b\u8981\u4f18\u52bf<\/h3>\n<\/p>\n<p><h4>\u63d0\u9ad8\u7f51\u7ad9\u52a0\u8f7d\u901f\u5ea6<\/h4>\n<\/p>\n<p><p>HTTP\/2 \u5f15\u5165\u4e86\u591a\u8def\u590d\u7528\u6280\u672f\uff0c\u5141\u8bb8\u591a\u4e2a\u8bf7\u6c42\u5728\u5355\u4e00\u7684TCP\u8fde\u63a5\u4e0a\u5e76\u53d1\u8fdb\u884c\uff0c\u8fd9\u5927\u5927\u51cf\u5c11\u4e86\u7f51\u9875\u52a0\u8f7d\u65f6\u95f4\u3002\u5728HTTP\/1.x\u4e2d\uff0c\u6bcf\u4e2a\u8bf7\u6c42-\u54cd\u5e94\u5468\u671f\u5b8c\u6210\u540e\uff0cTCP\u8fde\u63a5\u6216\u88ab\u5173\u95ed\u6216\u88ab\u91cd\u65b0\u7528\u4e8e\u65b0\u7684\u8bf7\u6c42\u3002HTTP\/2\u7684\u591a\u8def\u590d\u7528\u4f7f\u5f97\u591a\u4e2a\u8bf7\u6c42\u53ef\u4ee5\u540c\u65f6\u5728\u4e00\u4e2a\u8fde\u63a5\u4e0a\u8fdb\u884c\uff0c\u51cf\u5c11\u4e86\u63e1\u624b\u6b21\u6570\u548c\u5ef6\u8fdf\u3002<\/p>\n<\/p>\n<p><h4>\u670d\u52a1\u5668\u63a8\u9001\u529f\u80fd<\/h4>\n<\/p>\n<p><p>HTTP\/2\u5f15\u5165\u4e86\u670d\u52a1\u5668\u63a8\u9001\u529f\u80fd\uff0c\u5141\u8bb8\u670d\u52a1\u5668\u4e3b\u52a8\u5411\u5ba2\u6237\u7aef\u53d1\u9001\u8d44\u6e90\uff0c\u800c\u4e0d\u9700\u8981\u5ba2\u6237\u7aef\u660e\u786e\u5730\u8bf7\u6c42\u8fd9\u4e9b\u8d44\u6e90\u3002\u8fd9\u53ef\u4ee5\u8fdb\u4e00\u6b65\u51cf\u5c11\u5ef6\u8fdf\uff0c\u5c24\u5176\u662f\u5728\u7f51\u9875\u9996\u6b21\u52a0\u8f7d\u65f6\u3002\u670d\u52a1\u5668\u53ef\u4ee5\u9884\u6d4b\u5ba2\u6237\u7aef\u5c06\u9700\u8981\u54ea\u4e9b\u8d44\u6e90\uff0c\u5e76\u63d0\u524d\u53d1\u9001\uff0c\u4ece\u800c\u5728\u5ba2\u6237\u7aef\u5904\u7406\u5176\u5b83\u5185\u5bb9\u65f6\u5e76\u884c\u52a0\u8f7d\u8fd9\u4e9b\u8d44\u6e90\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u6f5c\u5728\u95ee\u9898\u548c\u6311\u6218<\/h3>\n<\/p>\n<p><h4>\u517c\u5bb9\u6027\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u867d\u7136\u5927\u591a\u6570\u73b0\u4ee3\u6d4f\u89c8\u5668\u90fd\u652f\u6301HTTP\/2\uff0c\u4f46\u5b58\u5728\u4e00\u4e9b\u8f83\u65e7\u7684\u6d4f\u89c8\u5668\u548c\u5ba2\u6237\u7aef\u4e0d\u5b8c\u5168\u517c\u5bb9HTTP\/2\u534f\u8bae\u3002\u8fd9\u5c31\u9700\u8981\u5f00\u53d1\u8005\u5728\u5347\u7ea7\u65f6\u8003\u8651\u5230\u517c\u5bb9\u6027\u7b56\u7565\uff0c\u6bd4\u5982\u901a\u8fc7\u9002\u5f53\u7684\u670d\u52a1\u7aef\u914d\u7f6e\uff0c\u786e\u4fdd\u5f53\u5ba2\u6237\u7aef\u4e0d\u652f\u6301HTTP\/2\u65f6\u80fd\u591f\u81ea\u52a8\u964d\u7ea7\u5230HTTP\/1.1\u3002<\/p>\n<\/p>\n<p><h4>\u914d\u7f6e\u590d\u6742\u6027<\/h4>\n<\/p>\n<p><p>\u5c3d\u7ba1HTTP\/2\u5e26\u6765\u4e86\u8bb8\u591a\u6027\u80fd\u4f18\u5316\uff0c\u4f46\u4e0eHTTP\/1.x\u76f8\u6bd4\uff0c\u5b83\u7684\u670d\u52a1\u5668\u914d\u7f6e\u901a\u5e38\u66f4\u52a0\u590d\u6742\u3002\u8981\u5145\u5206\u5229\u7528HTTP\/2\u7684\u7279\u6027\uff0c\u5982\u670d\u52a1\u5668\u63a8\u9001\uff0c\u5f00\u53d1\u8005\u9700\u8981\u5bf9\u7f51\u7ad9\u8d44\u6e90\u7684\u52a0\u8f7d\u65b9\u5f0f\u6709\u6df1\u5165\u7684\u7406\u89e3\uff0c\u5e76\u8fdb\u884c\u76f8\u5e94\u7684\u914d\u7f6e\u4f18\u5316\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u52a0\u5bc6\u8981\u6c42<\/h3>\n<\/p>\n<p><p>HTTP\/2\u534f\u8bae\u63a8\u8350\u4f7f\u7528TLS\u52a0\u5bc6\uff0c\u867d\u7136\u7406\u8bba\u4e0aHTTP\/2\u4e0d\u5f3a\u5236\u8981\u6c42\u52a0\u5bc6\uff0c\u4f46\u5b9e\u9645\u4e0a\u6240\u6709\u4e3b\u6d41\u7684\u6d4f\u89c8\u5668\u90fd\u53ea\u5728HTTPS\u60c5\u5f62\u4e0b\u652f\u6301HTTP\/2\u3002\u8fd9\u610f\u5473\u7740\u7f51\u7ad9\u5fc5\u987b\u542f\u7528HTTPS\uff0c\u589e\u52a0\u4e86\u7f51\u7ad9\u7ef4\u62a4\u7684\u590d\u6742\u6027\u548c\u6210\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6027\u80fd\u8003\u91cf<\/h3>\n<\/p>\n<p><p>\u867d\u7136HTTP\/2\u65e8\u5728\u63d0\u9ad8\u6027\u80fd\uff0c\u4f46\u5e76\u4e0d\u662f\u6240\u6709\u60c5\u51b5\u4e0b\u90fd\u80fd\u5e26\u6765\u6027\u80fd\u63d0\u5347\u3002\u5728\u67d0\u4e9b\u7279\u5b9a\u573a\u666f\u4e0b\uff0c\u6bd4\u5982\u7f51\u7edc\u6761\u4ef6\u6781\u4f73\u65f6\uff0cHTTP\/2\u76f8\u8f83\u4e8eHTTP\/1.x\u7684\u6027\u80fd\u63d0\u5347\u53ef\u80fd\u4e0d\u4f1a\u5f88\u660e\u663e\u3002\u6b64\u5916\uff0c\u5982\u679c\u7f51\u7ad9\u6ca1\u6709\u9488\u5bf9HTTP\/2\u8fdb\u884c\u4f18\u5316\uff0c\u4f8b\u5982\u6ca1\u6709\u5408\u7406\u4f7f\u7528\u670d\u52a1\u5668\u63a8\u9001\uff0c\u53ef\u80fd\u4e0d\u4f1a\u5145\u5206\u53d1\u6325\u51faHTTP\/2\u7684\u6027\u80fd\u4f18\u52bf\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u5b89\u5168\u6027\u8003\u8651<\/h3>\n<\/p>\n<p><p>\u5c3d\u7ba1HTTP\/2\u672c\u8eab\u5305\u62ec\u4e86\u52a0\u5f3a\u5b89\u5168\u6027\u7684\u8bbe\u8ba1\uff0c\u4f46\u52a0\u5bc6\u7684\u4f7f\u7528\u4e5f\u5e26\u6765\u4e86\u65b0\u7684\u5b89\u5168\u6311\u6218\u3002\u4f8b\u5982\uff0cTLS\u914d\u7f6e\u4e0d\u5f53\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5b89\u5168\u6f0f\u6d1e\uff0c\u800c\u670d\u52a1\u5668\u63a8\u9001\u529f\u80fd\u5982\u679c\u4f7f\u7528\u4e0d\u5f53\uff0c\u53ef\u80fd\u4f1a\u88ab\u653b\u51fb\u8005\u5229\u7528\u6765\u8fdb\u884c\u9493\u9c7c\u653b\u51fb\u3002<\/p>\n<\/p>\n<p><p><strong>\u603b\u800c\u8a00\u4e4b\uff0c\u867d\u7136HTTP\/2\u63d0\u4f9b\u4e86\u663e\u8457\u7684\u6027\u80fd\u4f18\u52bf\u548c\u65b0\u529f\u80fd\uff0c\u4f46\u5728\u65e0\u8111\u5347\u7ea7\u6240\u6709HTTPS\u9879\u76ee\u65f6\uff0c\u9700\u8981\u8003\u8651\u5230\u517c\u5bb9\u6027\u3001\u914d\u7f6e\u3001\u6027\u80fd\u4f18\u5316\u4ee5\u53ca\u5b89\u5168\u6027\u7b49\u591a\u65b9\u9762\u56e0\u7d20\u3002\u53ea\u6709\u901a\u8fc7\u4ed4\u7ec6\u89c4\u5212\u548c\u9002\u5f53\u4f18\u5316\uff0c\u624d\u80fd\u786e\u4fdd\u4eceHTTP\/2\u5347\u7ea7\u4e2d\u83b7\u5f97\u6700\u5927\u76ca\u5904\uff0c\u540c\u65f6\u89c4\u904d\u6f5c\u5728\u7684\u95ee\u9898\u548c\u98ce\u9669\u3002<\/strong><\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u4e3a\u4ec0\u4e48\u5c06HTTPS\u9879\u76ee\u5347\u7ea7\u5230HTTP\/2\u65f6\u8981\u5c0f\u5fc3\uff1f<\/strong><\/p>\n<p>\u5347\u7ea7HTTPS\u9879\u76ee\u5230HTTP\/2\u662f\u4e00\u4e2a\u503c\u5f97\u8003\u8651\u7684\u4e3e\u63aa\uff0c\u4f46\u4e5f\u9700\u8981\u8c28\u614e\u884c\u4e8b\u3002HTTP\/2\u4e3b\u8981\u4e13\u6ce8\u4e8e\u4f18\u5316\u6027\u80fd\uff0c\u63d0\u4f9b\u66f4\u9ad8\u7684\u901f\u5ea6\u548c\u6548\u7387\u3002\u7136\u800c\uff0c\u5347\u7ea7\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u6311\u6218\u548c\u95ee\u9898\u3002<\/p>\n<p><strong>2. \u5347\u7ea7HTTPS\u9879\u76ee\u5230HTTP\/2\u53ef\u80fd\u9047\u5230\u7684\u6311\u6218\u6709\u54ea\u4e9b\uff1f<\/strong><\/p>\n<p>\u5347\u7ea7\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u6311\u6218\u3002\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u7684\u670d\u52a1\u5668\u548c\u6d4f\u89c8\u5668\u90fd\u652f\u6301HTTP\/2\u534f\u8bae\u3002\u5982\u679c\u4e0d\u652f\u6301\uff0c\u60a8\u9700\u8981\u8fdb\u884c\u76f8\u5e94\u7684\u5347\u7ea7\u3002\u5176\u6b21\uff0c\u786e\u4fdd\u60a8\u7684\u7f51\u7ad9\u4ee3\u7801\u548c\u7b2c\u4e09\u65b9\u63d2\u4ef6\u4e0eHTTP\/2\u517c\u5bb9\uff0c\u4ee5\u907f\u514d\u51b2\u7a81\u548c\u9519\u8bef\u3002\u8fd8\u8981\u6ce8\u610fHTTP\/2\u7684\u65b0\u7279\u6027\u548c\u884c\u4e3a\uff0c\u4ee5\u786e\u4fdd\u60a8\u7684\u7f51\u7ad9\u80fd\u591f\u6700\u5927\u5316\u5730\u5229\u7528\u8fd9\u4e9b\u4f18\u52bf\u3002<\/p>\n<p><strong>3. \u4f60\u9700\u8981\u8003\u8651\u7684\u5176\u4ed6\u56e0\u7d20\u662f\u4ec0\u4e48\uff0c\u5f53\u5c06HTTPS\u9879\u76ee\u5347\u7ea7\u5230HTTP\/2\u65f6\uff1f<\/strong><\/p>\n<p>\u5347\u7ea7\u5230HTTP\/2\u4e4b\u524d\uff0c\u8fd8\u9700\u8981\u8003\u8651\u4e00\u4e9b\u91cd\u8981\u56e0\u7d20\u3002\u9996\u5148\uff0c\u8bc4\u4f30\u60a8\u7684\u7f51\u7ad9\u7684\u5f53\u524d\u6027\u80fd\u548c\u901f\u5ea6\uff0c\u4ee5\u786e\u5b9a\u5347\u7ea7\u4e4b\u524d\u7684\u57fa\u51c6\u3002\u5176\u6b21\uff0c\u505a\u597d\u5907\u4efd\u548c\u6d4b\u8bd5\u5de5\u4f5c\uff0c\u4ee5\u786e\u4fdd\u5728\u5347\u7ea7\u8fc7\u7a0b\u4e2d\u4e0d\u4f1a\u4e22\u5931\u4efb\u4f55\u6570\u636e\u6216\u9047\u5230\u610f\u5916\u95ee\u9898\u3002\u6700\u91cd\u8981\u7684\u662f\uff0c\u76d1\u63a7\u5347\u7ea7\u540e\u7684\u7f51\u7ad9\u6027\u80fd\u548c\u6027\u80fd\uff0c\u4ee5\u786e\u4fddHTTP\/2\u771f\u6b63\u5e26\u6765\u4e86\u9884\u671f\u7684\u597d\u5904\uff0c\u5e76\u53ca\u65f6\u89e3\u51b3\u4efb\u4f55\u95ee\u9898\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5c06\u6240\u6709HTTPS\u9879\u76ee\u5347\u7ea7\u5230HTTP\/2\u4f1a\u5e26\u6765\u4e00\u7cfb\u5217\u6539\u8fdb\u548c\u4f18\u52bf\uff0c\u5305\u62ec\u63d0\u9ad8\u7f51\u7ad9\u52a0\u8f7d\u901f\u5ea6\u3001\u4f18\u5316\u8fde\u63a5\u590d\u7528\u3001\u5934\u90e8\u538b\u7f29\u4ee5\u53ca [&hellip;]","protected":false},"author":3,"featured_media":274056,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/274035"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=274035"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/274035\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/274056"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=274035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=274035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=274035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}