{"id":233525,"date":"2023-12-25T21:16:20","date_gmt":"2023-12-25T13:16:20","guid":{"rendered":"https:\/\/www.idc.net\/help\/233525\/"},"modified":"2023-12-25T21:16:20","modified_gmt":"2023-12-25T13:16:20","slug":"apache%e5%ae%89%e5%85%a8%e7%ad%96%e7%95%a5%ef%bc%9a%e4%bd%bf%e7%94%a8mod_proxy_http2%e8%bf%9b%e8%a1%8chttp-2%e4%bb%a3%e7%90%86","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/233525\/","title":{"rendered":"Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_proxy_http2\u8fdb\u884cHTTP\/2\u4ee3\u7406"},"content":{"rendered":"<p><title id=\"apache%e5%ae%89%e5%85%a8%e7%ad%96%e7%95%a5%ef%bc%9a%e4%bd%bf%e7%94%a8mod_proxy_http2%e8%bf%9b%e8%a1%8chttp-2%e4%bb%a3%e7%90%86-OZXTWsrtVF\">Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_proxy_http2\u8fdb\u884cHTTP\/2\u4ee3\u7406<\/title><\/p>\n<h1 id=\"apache%e5%ae%89%e5%85%a8%e7%ad%96%e7%95%a5%ef%bc%9a%e4%bd%bf%e7%94%a8mod_proxy_http2%e8%bf%9b%e8%a1%8chttp-2%e4%bb%a3%e7%90%86-OZXTWsrtVF\">Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_proxy_http2\u8fdb\u884cHTTP\/2\u4ee3\u7406<\/h1>\n<h2 id=\"%e4%bb%80%e4%b9%88%e6%98%afhttp-2%e4%bb%a3%e7%90%86%ef%bc%9f-OZXTWsrtVF\">\u4ec0\u4e48\u662fHTTP\/2\u4ee3\u7406\uff1f<\/h2>\n<p>HTTP\/2\u662f\u4e00\u79cd\u7528\u4e8e\u5728Web\u6d4f\u89c8\u5668\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u4f20\u8f93\u6570\u636e\u7684\u534f\u8bae\u3002\u5b83\u662fHTTP\/1.1\u7684\u5347\u7ea7\u7248\u672c\uff0c\u65e8\u5728\u63d0\u9ad8\u6027\u80fd\u548c\u5b89\u5168\u6027\u3002HTTP\/2\u4ee3\u7406\u662f\u6307\u4f7f\u7528HTTP\/2\u534f\u8bae\u8fdb\u884c\u4ee3\u7406\u670d\u52a1\u5668\u7684\u914d\u7f6e\u548c\u64cd\u4f5c\u3002<\/p>\n<h2 id=\"%e4%b8%ba%e4%bb%80%e4%b9%88%e4%bd%bf%e7%94%a8mod_proxy_http2%ef%bc%9f-OZXTWsrtVF\">\u4e3a\u4ec0\u4e48\u4f7f\u7528mod_proxy_http2\uff1f<\/h2>\n<p>Apache\u662f\u4e00\u79cd\u5e38\u7528\u7684Web\u670d\u52a1\u5668\u8f6f\u4ef6\uff0c\u800cmod_proxy_http2\u662fApache\u7684\u4e00\u4e2a\u6a21\u5757\uff0c\u7528\u4e8e\u652f\u6301HTTP\/2\u4ee3\u7406\u3002\u4f7f\u7528mod_proxy_http2\u53ef\u4ee5\u63d0\u4f9b\u66f4\u5feb\u7684\u7f51\u9875\u52a0\u8f7d\u901f\u5ea6\u548c\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%aeapache%e8%bf%9b%e8%a1%8chttp-2%e4%bb%a3%e7%90%86%ef%bc%9f-OZXTWsrtVF\">\u5982\u4f55\u914d\u7f6eApache\u8fdb\u884cHTTP\/2\u4ee3\u7406\uff1f<\/h2>\n<p>\u8981\u914d\u7f6eApache\u8fdb\u884cHTTP\/2\u4ee3\u7406\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86Apache\u548cmod_proxy_http2\u6a21\u5757\u3002\u7136\u540e\uff0c\u5728Apache\u7684\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>\nLoadModule proxy_module modules\/mod_proxy.so\nLoadModule proxy_http2_module modules\/mod_proxy_http2.so\n\n&lt;IfModule mod_proxy_http2.c&gt;\n    ProxyPass \"\/example\" \"http:\/\/example.com\" connectiontimeout=5 timeout=30\n&lt;\/IfModule&gt;\n<\/pre>\n<p>\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\"http:\/\/example.com\"\u662f\u8981\u4ee3\u7406\u7684\u76ee\u6807\u7f51\u7ad9\u7684URL\u3002\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8fdb\u884c\u4fee\u6539\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u6839\u636e\u9700\u8981\u6dfb\u52a0\u5176\u4ed6\u914d\u7f6e\u9009\u9879\uff0c\u5982\u8d85\u65f6\u65f6\u95f4\u7b49\u3002<\/p>\n<h2 id=\"%e7%a4%ba%e4%be%8b%ef%bc%9a%e4%bd%bf%e7%94%a8mod_proxy_http2%e8%bf%9b%e8%a1%8chttp-2%e4%bb%a3%e7%90%86-OZXTWsrtVF\">\u793a\u4f8b\uff1a\u4f7f\u7528mod_proxy_http2\u8fdb\u884cHTTP\/2\u4ee3\u7406<\/h2>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u4f7f\u7528mod_proxy_http2\u8fdb\u884cHTTP\/2\u4ee3\u7406\u7684\u793a\u4f8b\uff1a<\/p>\n<pre>\n&lt;IfModule mod_proxy_http2.c&gt;\n    ProxyPass \"\/example\" \"http:\/\/example.com\" connectiontimeout=5 timeout=30\n&lt;\/IfModule&gt;\n<\/pre>\n<p>\u5728\u4e0a\u8ff0\u793a\u4f8b\u4e2d\uff0c\u5c06\u6240\u6709\u4ee5\"\/example\"\u5f00\u5934\u7684\u8bf7\u6c42\u4ee3\u7406\u5230\"http:\/\/example.com\"\u3002\u8fd9\u6837\uff0c\u5f53\u7528\u6237\u8bbf\u95ee\u7f51\u7ad9\u7684\"\/example\"\u8def\u5f84\u65f6\uff0c\u5b9e\u9645\u4e0a\u662f\u8bbf\u95ee\u4e86\u76ee\u6807\u7f51\u7ad9\"http:\/\/example.com\"\u3002<\/p>\n<h2 id=\"%e6%80%bb%e7%bb%93-OZXTWsrtVF\">\u603b\u7ed3<\/h2>\n<p>\u901a\u8fc7\u4f7f\u7528Apache\u7684mod_proxy_http2\u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u914d\u7f6e\u548c\u64cd\u4f5cHTTP\/2\u4ee3\u7406\u3002HTTP\/2\u4ee3\u7406\u53ef\u4ee5\u63d0\u4f9b\u66f4\u5feb\u7684\u7f51\u9875\u52a0\u8f7d\u901f\u5ea6\u548c\u66f4\u597d\u7684\u7528\u6237\u4f53\u9a8c\u3002\u5982\u679c\u60a8\u6b63\u5728\u5bfb\u627e\u53ef\u9760\u7684\u9999\u6e2f\u670d\u52a1\u5668\uff0c\u540e\u6d6a\u4e91\u662f\u60a8\u7684\u9996\u9009\u3002\u6211\u4eec\u63d0\u4f9b\u9ad8\u6027\u80fd\u7684\u9999\u6e2f\u670d\u52a1\u5668\uff0c\u4ee5\u53ca\u5176\u4ed6\u591a\u79cd\u670d\u52a1\u5668\u548c\u4e91\u8ba1\u7b97\u4ea7\u54c1\u3002\u8bf7\u8bbf\u95ee\u6211\u4eec\u7684\u5b98\u7f51\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff1a<a href=\"https:\/\/idc.net\">https:\/\/idc.net<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod_proxy_http2\u8fdb\u884cHTTP\/2\u4ee3\u7406 Apache\u5b89\u5168\u7b56\u7565\uff1a\u4f7f\u7528mod [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[],"class_list":["post-233525","post","type-post","status-publish","format-standard","hentry","category-apache"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/233525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=233525"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/233525\/revisions"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=233525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=233525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=233525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}