{"id":111,"date":"2026-08-13T11:45:07","date_gmt":"2026-08-13T03:45:07","guid":{"rendered":"https:\/\/xiuxiejiang.com\/?p=111"},"modified":"2026-08-13T11:46:12","modified_gmt":"2026-08-13T03:46:12","slug":"cve-2026-42945","status":"publish","type":"post","link":"https:\/\/xiuxiejiang.com\/index.php\/2026\/08\/13\/cve-2026-42945\/","title":{"rendered":"CVE-2026-42945, NGINX\u53f2\u4e0a\u6700\u5371\u9669\u7684\u6f0f\u6d1e\u6559\u4f1a\u6211\u4eec\u4ec0\u4e48"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u8f6c\u81ea\uff1a<a href=\"https:\/\/www.zhihu.com\/collection\/205613149\">https:\/\/www.zhihu.com\/collection\/205613149<\/a> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u539f\u4f5c\u8005\uff1a<a href=\"https:\/\/www.zhihu.com\/people\/ouzian\" target=\"_blank\" rel=\"noreferrer noopener\">\u6700\u540e\u7684\u7ec5\u58eb<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f60\u4ee5\u4e3a\u6700\u5b89\u5168\u7684\u90a3\u5835\u5899\uff0c\u53ef\u80fd\u5df2\u7ecf\u88f8\u5954\u4e8618\u5e74<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">2008\u5e74\uff0c\u4f60\u5728\u5e72\u4ec0\u4e48\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u90a3\u4e00\u5e74\uff0c\u6bd4\u7279\u5e01\u767d\u76ae\u4e66\u521a\u521a\u53d1\u8868\uff0ciPhone 3G\u53d1\u5e03\uff0c\u5317\u4eac\u5965\u8fd0\u4f1a\u5f00\u5e55\u3002\u4e5f\u662f\u90a3\u4e00\u5e74\uff0c\u4e00\u4e2a\u5de5\u7a0b\u5e08\u5728NGINX\u6e90\u7801\u91cc\u63d0\u4ea4\u4e86\u4e00\u6bb5\u770b\u4f3c\u4eba\u755c\u65e0\u5bb3\u7684\u4ee3\u7801\u3002\u4ed6\u5927\u6982\u6c38\u8fdc\u4e0d\u4f1a\u60f3\u5230\u2014\u2014<strong>\u8fd9\u6bb5\u4ee3\u7801\u4f1a\u572818\u5e74\u540e\uff0c\u628a\u5168\u7403\u8fd1\u4e09\u5206\u4e4b\u4e00\u7684\u7f51\u7ad9\u76f4\u63a5\u9001\u5230\u653b\u51fb\u8005\u7684\u67aa\u53e3\u4e0b\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u8fd1\uff0cdepthfirst\u7684\u7cfb\u7edf\u626b\u4e86\u4e00\u904dNGINX\u6e90\u7801\u3002\u516d\u5c0f\u65f6\u540e\uff0c\u7cfb\u7edf\u5410\u51fa\u4e865\u4e2a\u5185\u5b58\u7834\u574f\u6f0f\u6d1e\u3002\u5176\u4e2d4\u4e2a\u88abNGINX\u5b98\u65b9\u786e\u8ba4\u3002\u6700\u72e0\u7684\u90a3\u4e2a\uff0cCVSS\u8bc4\u52069.2\uff0c\u662f\u4e00\u4e2a\u5806\u7f13\u51b2\u533a\u6ea2\u51fa\uff0c<strong>2008\u5e74\u5f15\u5165\uff0c\u6f5c\u4f0f\u81f3\u4eca\uff0c\u6a2a\u8de8\u4e86\u6574\u6574\u4e00\u4ee3\u4e92\u8054\u7f51\u57fa\u7840\u8bbe\u65bd<\/strong>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u8bf4\u7ed3\u8bba\uff1a\u53ea\u8981\u4f60\u7528\u4e86<code>rewrite<\/code>\u548c<code>set<\/code>\u8fd9\u4e24\u4e2a\u6307\u4ee4\u2014\u2014\u76f8\u4fe1\u6211\uff0c\u7528\u5b83\u4eec\u7684\u4eba\u6bd4\u4f60\u60f3\u8c61\u7684\u8981\u591a\u5f97\u591a\u2014\u2014\u4f60\u5c31\u5904\u4e8e\u98ce\u9669\u4e4b\u4e2d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u6bd4\u8d77\u6f0f\u6d1e\u672c\u8eab\uff0c\u66f4\u503c\u5f97\u6df1\u6316\u7684\u662f\u5b83\u80cc\u540e\u7684\u6545\u4e8b\u3002\u4e3a\u4ec0\u4e48\u4e00\u4e2a\u88ab\u65e0\u6570\u53cc\u773c\u775b\u5ba1\u89c6\u8fc7\u7684\u9879\u76ee\uff0c\u80fd\u8ba9\u4e00\u4e2a\u81f4\u547d\u6f0f\u6d1e\u85cf\u4e8618\u5e74\uff1f\u653b\u51fb\u8005\u53c8\u662f\u600e\u4e48\u7528URI\u91cc\u7684\u52a0\u53f7\uff0c\u4e00\u6b65\u6b65\u628a\u670d\u52a1\u5668\u53d8\u6210\u81ea\u5df1\u7684\u5080\u5121\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u9762\u6709\u4e00\u5957\u5b8c\u6574\u7684\u201d\u8106\u5f31\u6027\u54f2\u5b66\u201d\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">1. \u4e24\u904d\u626b\u63cf\u7684\u201d\u642c\u5bb6\u6096\u8bba\u201d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u8bf4\u4e00\u4e2a\u751f\u6d3b\u573a\u666f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u627e\u4e86\u5bb6\u642c\u5bb6\u516c\u53f8\u3002\u4ed6\u4eec\u7684\u6d41\u7a0b\u975e\u5e38\u4e13\u4e1a\uff1a<strong>\u5148\u6d3e\u4e00\u4e2a\u4eba\u4e0a\u95e8\u4f30\u7b97\uff0c\u8bb0\u4e0b\u6240\u6709\u5bb6\u5177\u7684\u5c3a\u5bf8\uff0c\u7b97\u51fa\u9700\u8981\u591a\u5927\u4e00\u8f86\u8f66\u3002\u7136\u540e\u7b2c\u4e8c\u5929\uff0c\u53e6\u4e00\u961f\u4eba\u6309\u7740\u6e05\u5355\u642c\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NGINX\u7684\u811a\u672c\u5f15\u64ce\uff0c\u5728\u9aa8\u5b50\u91cc\u5c31\u662f\u8fd9\u4e48\u5e72\u7684\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53\u5b83\u5904\u7406<code>rewrite<\/code>\u548c<code>set<\/code>\u8fd9\u7c7b\u6307\u4ee4\u65f6\uff0c\u4e0d\u4f1a\u50bb\u4e4e\u4e4e\u5730\u6bcf\u6b21\u5206\u914d\u4e00\u70b9\u5185\u5b58\u62fc\u8d77\u6765\u3002\u5b83\u505a\u4e86\u4e00\u4e2a\u806a\u660e\u7684\u4f18\u5316\u2014\u2014<strong>\u4e24\u904d\u5904\u7406<\/strong>\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7b2c\u4e00\u904d\uff08\u957f\u5ea6\u8ba1\u7b97\uff09<\/strong>\uff1a\u5148\u8dd1\u4e00\u904d\uff0c\u7b97\u51fa\u6700\u7ec8\u5b57\u7b26\u4e32\u6709\u591a\u957f\uff0c\u4e00\u6b21\u6027\u5206\u914d\u6070\u597d\u7684\u5185\u5b58\u3002<\/li>\n\n\n\n<li><strong>\u7b2c\u4e8c\u904d\uff08\u6570\u636e\u590d\u5236\uff09<\/strong>\uff1a\u518d\u8dd1\u4e00\u904d\uff0c\u628a\u771f\u6b63\u7684\u6570\u636e\u586b\u8fdb\u53bb\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u8bbe\u8ba1\u7684\u521d\u8877\u662f\u201d\u7cbe\u6253\u7ec6\u7b97\u201d\uff0c\u907f\u514d\u9891\u7e41\u7684\u5c0f\u5757\u5185\u5b58\u5206\u914d\u3002\u542c\u8d77\u6765\u5b8c\u7f8e\uff0c\u5bf9\u5427\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u95ee\u9898\u6070\u6070\u51fa\u5728\u8fd9\u4e2a\u201d\u4e24\u904d\u201d\u4e0a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5982\u679c\u7b2c\u4e00\u904d\u548c\u7b2c\u4e8c\u904d\u4e4b\u95f4\uff0c\u5f15\u64ce\u7684\u67d0\u4e2a\u72b6\u6001\u6084\u6084\u53d8\u4e86\u2014\u2014\u90a3\u7b2c\u4e00\u904d\u7b97\u51fa\u6765\u7684\u957f\u5ea6\uff0c\u5c31\u4e0d\u518d\u7b49\u4e8e\u7b2c\u4e8c\u904d\u5b9e\u9645\u5199\u5165\u7684\u6570\u636e\u91cf\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u50cf\u91cf\u623f\u7684\u4eba\u7528\u7684\u662f\u6807\u51c6\u5377\u5c3a\uff0c\u4f46\u642c\u5bb6\u5177\u90a3\u5929\u5de5\u4eba\u6362\u4e86\u4e00\u628a\u201d\u7279\u6b8a\u201d\u7684\u5c3a\u5b50\u2014\u2014\u540c\u4e00\u4ef6\u6c99\u53d1\uff0c\u91cf\u51fa\u67651\u7c73\uff0c\u642c\u8fdb\u53bb\u53d8\u6210\u4e863\u7c73\u3002\u8f66\u88c5\u4e0d\u4e0b\u4e86\uff0c\u53ea\u80fd\u786c\u585e\uff0c\u585e\u5230\u90bb\u5c45\u5bb6\u7684\u8f66\u4f4d\u91cc\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2. \u90a3\u4e2a\u5fd8\u8bb0\u6e05\u96f6\u7684\u6807\u5fd7\u4f4d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\u6211\u4eec\u628a\u955c\u5934\u63a8\u5230\u6e90\u7801\u5c42\u9762\u3002\u8fd9\u4e2a\u6f0f\u6d1e\u7684\u6838\u5fc3\uff0c\u5728<code>src\/http\/ngx_http_script.c<\/code>\u91cc\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5173\u952e\u89d2\u8272\u662f\u4e00\u4e2a\u53eb<code>is_args<\/code>\u7684\u6807\u5fd7\u4f4d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u7684\u4f5c\u7528\u5f88\u7b80\u5355\uff1a\u5f53NGINX\u5728\u91cd\u5199URI\u65f6\u9047\u5230\u4e00\u4e2a\u95ee\u53f7\uff0c\u5c31\u8bbe\u7f6e<code>e-&gt;is_args = 1<\/code>\uff0c\u610f\u601d\u662f\u201d\u563f\uff0c\u540e\u9762\u8ddf\u7740\u7684\u662f\u67e5\u8be2\u53c2\u6570\uff0c\u91cc\u9762\u7684\u7279\u6b8a\u5b57\u7b26\u9700\u8981\u8f6c\u4e49\u201d\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">void ngx_http_script_start_args_code(ngx_http_script_engine_t *e)\n{\n    e->is_args = 1;\n    e->args = e->pos;\n    e->ip += sizeof(uintptr_t);\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u903b\u8f91\u4e0a\u770b\uff0c\u6ca1\u6bdb\u75c5\u3002\u9700\u8981\u8f6c\u4e49\u7684\u65f6\u5019\uff0c\u8bbe\u7f6e\u6807\u5fd7\u4f4d\uff0c\u8ba9\u540e\u7eed\u5904\u7406\u77e5\u9053\u8981\u8f6c\u4e49\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f46\u6709\u4e00\u4e2a\u95ee\u9898\uff1a\u8fd9\u4e2a\u6807\u5fd7\u4f4d\uff0c\u4ece\u6765\u6ca1\u6709\u4eba\u53bb\u6e05\u96f6\u5b83\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u5c31\u50cf\u4e00\u4e2a\u5f00\u5173\u88ab\u6309\u4e0b\u4e4b\u540e\uff0c\u518d\u4e5f\u6ca1\u6709\u5f39\u8d77\u6765\u8fc7\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u53ea\u662f\u4e00\u6761<code>rewrite<\/code>\u6307\u4ee4\u81ea\u5df1\u8dd1\u5b8c\u5c31\u7ed3\u675f\uff0c\u90a3\u4e5f\u6ca1\u4e8b\u2014\u2014\u53cd\u6b63\u6211\u8bbe\u4e86\u6807\u5fd7\uff0c\u6211\u7528\u4e86\uff0c\u6d41\u7a0b\u7ed3\u675f\u3002\u4f46\u73b0\u5b9e\u4e2d\u7684NGINX\u914d\u7f6e\u5f80\u5f80\u662f\u591a\u6761\u6307\u4ee4\u7ec4\u5408\u4f7f\u7528\u3002\u6bd4\u5982\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">location ~ ^\/api\/(.*)$ {\n    rewrite ^\/api\/(.*)$ \/internal?migrated=true;\n    set $original_endpoint $1;\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148<code>rewrite<\/code>\u2014\u2014\u5e26\u95ee\u53f7\uff0c\u89e6\u53d1<code>is_args = 1<\/code>\u3002\u7136\u540e<code>set<\/code>\u2014\u2014\u5b83\u672c\u8eab\u8ddf\u95ee\u53f7\u65e0\u5173\uff0c\u4e0d\u5e94\u8be5\u53d7\u8fd9\u4e2a\u6807\u5fd7\u5f71\u54cd\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f46\u6807\u5fd7\u5df2\u7ecf\u88ab\u6c61\u67d3\u4e86\uff0c\u800c<code>set<\/code>\u6839\u672c\u4e0d\u77e5\u9053\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\uff0c\u6211\u4eec\u8fdb\u5165\u4e86\u201d\u4e24\u904d\u626b\u63cf\u201d\u90a3\u4e2a\u8bbe\u8ba1\u7684\u81f4\u547d\u533a\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3. \u201c\u4f60\u662f\u65b0\u6765\u7684\uff0c\u4f60\u5f53\u7136\u4e0d\u77e5\u9053\u201d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f53<code>set<\/code>\u6307\u4ee4\u6267\u884c\u65f6\uff0c\u5b83\u8c03\u7528\u4e86<code>ngx_http_script_complex_value_code<\/code>\u51fd\u6570\u3002\u8fd9\u4e2a\u51fd\u6570\u5728\u7b2c\u4e00\u904d\uff08\u8ba1\u7b97\u957f\u5ea6\uff09\u65f6\uff0c\u5e72\u4e86\u4e00\u4ef6\u770b\u4f3c\u5408\u7406\u7684\u4e8b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5b83\u521b\u5efa\u4e86\u4e00\u4e2a\u5168\u65b0\u7684\u3001\u5e72\u5e72\u51c0\u51c0\u7684\u5b50\u5f15\u64ce\u3002<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ngx_memzero(&amp;le, sizeof(ngx_http_script_engine_t)); \/\/ \u5168\u65b0\uff0c\u5168\u96f6<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u5b50\u5f15\u64ce\u53eb<code>le<\/code>\u3002\u5b83\u662f\u4ece\u96f6\u5f00\u59cb\u7684\u2014\u2014<code>le.is_args = 0<\/code>\uff0c\u6e05\u6e05\u767d\u767d\uff0c\u6ca1\u6709\u4efb\u4f55\u5386\u53f2\u5305\u88b1\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e8e\u662f\u7b2c\u4e00\u904d\u8ba1\u7b97\u957f\u5ea6\u65f6\uff0c\u5b83\u8d70\u8fdb\u8fd9\u4e2a\u5224\u65ad\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">if ((e->is_args || e->quote)\n    &amp;&amp; (e->request->quoted_uri || e->request->plus_in_uri))\n{\n    \/\/ \u9700\u8981\u8f6c\u4e49\uff0c\u957f\u5ea6 = \u539f\u59cb\u957f\u5ea6 + \u6bcf\u4e2a\u7279\u6b8a\u5b57\u7b26\u591a2\u5b57\u8282\n    return cap[n + 1] - cap[n]\n            + 2 * ngx_escape_uri(NULL, ...);\n} else {\n    \/\/ \u4e0d\u9700\u8981\u8f6c\u4e49\uff0c\u957f\u5ea6 = \u539f\u59cb\u957f\u5ea6\n    return cap[n + 1] - cap[n];\n}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u4e3a<code>le.is_args = 0<\/code>\uff0c\u5b83\u8d70\u4e86<code>else<\/code>\u5206\u652f\u3002<strong>\u5b83\u53ea\u8ba1\u7b97\u4e86\u539f\u59cb\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\uff0c\u5b8c\u5168\u6ca1\u6709\u7ed9\u8f6c\u4e49\u7559\u7a7a\u95f4\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u904d\u7ed3\u675f\u3002\u5185\u5b58\u5206\u914d\u597d\u4e86\u2014\u2014\u521a\u521a\u597d\u7b49\u4e8e\u539f\u59cb\u5b57\u7b26\u4e32\u7684\u957f\u5ea6\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\u7b2c\u4e8c\u904d\u6765\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\u904d\u662f\u5728<strong>\u4e3b\u5f15\u64ce<\/strong>\u4e0a\u8dd1\u7684\u3002\u4e3b\u5f15\u64ce\u7684<code>is_args<\/code>\u4ecd\u7136\u662f<code>1<\/code>\u2014\u2014\u90a3\u4e2a\u6807\u5fd7\u4f4d\u5230\u73b0\u5728\u4e5f\u6ca1\u6709\u4eba\u6e05\u8fc7\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u540c\u4e00\u4e2a\u5224\u65ad\uff0c\u8fd9\u6b21\u8d70\u8fdb\u4e86<code>if<\/code>\u5206\u652f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b83\u5f00\u59cb\u8f6c\u4e49\uff1a\u6bcf\u4e2a\u52a0\u53f7\u4ece1\u5b57\u8282\u81a8\u80c0\u52303\u5b57\u8282\uff08<code>%2B<\/code>\uff09\uff0c\u6bcf\u4e2a\u4e0e\u53f7\u4ece1\u5b57\u8282\u81a8\u80c0\u52303\u5b57\u8282\uff08<code>%26<\/code>\uff09\u2026\u2026<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5199\u51fa\u7684\u6570\u636e\u8fdc\u8d85\u7f13\u51b2\u533a\u8fb9\u754c\u3002\u6ea2\u51fa\u53d1\u751f\u4e86\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4. \u201c\u4f60\u6700\u597d\u7948\u7977\u8fd9\u4e2aworker\u4e0d\u4f1acrash\u201d\u2014\u2014\u4ee5\u53ca\u4e3a\u4ec0\u4e48crash\u53cd\u800c\u662f\u597d\u4e8b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5230\u8fd9\u91cc\uff0c\u4e00\u4e2a\u6709\u8da3\u7684\u95ee\u9898\u6d6e\u73b0\u4e86\uff1a\u6ea2\u51fa\u4e4b\u540e\u600e\u4e48\u529e\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5927\u591a\u6570\u8f6f\u4ef6\u91cc\uff0c\u5806\u7f13\u51b2\u533a\u6ea2\u51fa\u610f\u5473\u7740crash\uff0ccrash\u610f\u5473\u7740\u8fdb\u7a0b\u6b7b\u6389\u3002\u4f60\u53ea\u6709\u4e00\u6b21\u673a\u4f1a\uff0c\u5931\u8d25\u4e86\u5c31\u6ca1\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f46NGINX\u4e0d\u662f\u5927\u591a\u6570\u8f6f\u4ef6\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NGINX\u4f7f\u7528\u7684\u662f\u591a\u8fdb\u7a0b\u67b6\u6784\uff1a\u4e00\u4e2amaster\u8fdb\u7a0bfork\u51fa\u4e00\u5806worker\u3002\u5173\u952e\u70b9\u5728\u4e8e\u2014\u2014<strong>fork\u51fa\u7684worker\uff0c\u5185\u5b58\u5e03\u5c40\u548cmaster\u5b8c\u5168\u4e00\u81f4\u3002\u800c\u4e14\u8fd9\u4e2a\u5e03\u5c40\u662f\u786e\u5b9a\u7684<\/strong>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u610f\u5473\u7740\u4ec0\u4e48\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5982\u679c\u4f60\u7684exploit\u628aworker\u641e\u5d29\u4e86\uff0cmaster\u4f1a\u6de1\u5b9a\u5730\u91cd\u65b0fork\u4e00\u4e2a\u3002\u65b0worker\u7684\u5185\u5b58\u5e03\u5c40\u548c\u521a\u624d\u6b7b\u6389\u7684\u90a3\u4e2a\u4e00\u6a21\u4e00\u6837\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u53ef\u4ee5\u5728\u540c\u4e00\u4e2a\u9776\u5b50\u4e0a\u8bd5\u9519\u65e0\u6570\u6b21\uff0c\u76f4\u5230\u547d\u4e2d\u7ea2\u5fc3\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u662f\u7684\uff0c\u4f60\u6ca1\u770b\u9519\u2014\u2014\u591a\u8fdb\u7a0b\u67b6\u6784\uff0c\u8fd9\u4e2a\u8bbe\u8ba1\u521d\u8877\u662f\u4e3a\u4e86\u7a33\u5b9a\u6027\u548c\u6027\u80fd\uff0c\u7ed3\u679c\u6210\u4e86\u653b\u51fb\u8005\u53ef\u4ee5\u53cd\u590d\u201d\u8bfb\u6863\u91cd\u6765\u201d\u7684\u5e2e\u51f6\u3002\u4f60crash\u4e86\uff1f\u6ca1\u5173\u7cfb\uff0c\u4e0b\u4e00\u628a\u3002\u5185\u5b58\u5e03\u5c40\u4e0d\u53d8\uff0c\u4f60\u7684\u4e0a\u4e00\u6b21\u5c1d\u8bd5\u4e0d\u4f1a\u767d\u767d\u6d6a\u8d39\uff0c\u5b83\u544a\u8bc9\u4e86\u4f60\u504f\u79fb\u91cf\u5dee\u4e86\u591a\u5c11\uff0c\u4e0b\u4e00\u628a\u5fae\u8c03\u4e00\u4e0b\u5c31\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u5f53\u4f60\u65e0\u8bba\u5982\u4f55\u90fd\u8981\u9762\u5bf9\u4e00\u4e2a\u80fd\u65e0\u9650\u91cd\u8bd5\u7684\u5bf9\u624b\u65f6\uff0c\u4f60\u6700\u597d\u786e\u4fdd\u81ea\u5df1\u7684\u9632\u5fa1\u662f\u5b8c\u7f8e\u7684\u3002\u56e0\u4e3a\u5bf9\u65b9\u53ea\u9700\u8981\u6210\u529f\u4e00\u6b21\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5. \u52a0\u53f7\u80fd\u5e72\u4ec0\u4e48\uff1f\u2014\u2014\u201d\u4f60\u53ea\u80fd\u5199URI\u5b89\u5168\u5b57\u7b26\u201d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ea2\u51fa\u662f\u6709\u4e86\uff0c\u4f46\u653b\u51fb\u8005\u624b\u91cc\u80fd\u7528\u7684\u6b66\u5668\u5f88\u6709\u9650\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ea2\u51fa\u7684\u6570\u636e\u6765\u81eaURI\u3002URI\u91cc\u7684\u5b57\u7b26\u662f\u7ecf\u8fc7\u4e25\u683c\u8fc7\u6ee4\u7684\u2014\u2014\u53ea\u6709\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u4e00\u5c0f\u64ae\u7279\u6b8a\u7b26\u53f7\u80fd\u901a\u8fc7\u3002\u4f60\u6ca1\u6cd5\u5728\u91cc\u9762\u585e\u4e00\u4e2a<code>\\x00<\/code>\uff0c\u4e5f\u6ca1\u6cd5\u5d4c\u5165\u4efb\u610f\u4e8c\u8fdb\u5236\u5730\u5740\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u653b\u51fb\u8005\u7684\u5904\u5883\u662f\uff1a\u4f60\u6709\u4e00\u628a\u67aa\uff0c\u4f46\u5b50\u5f39\u662f\u6a61\u76ae\u7684\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u662f\u6574\u4e2aexploit\u4e2d\u6700\u7cbe\u5f69\u7684\u90e8\u5206\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u653b\u51fb\u8005\u76ef\u4e0a\u4e86NGINX\u7684\u5185\u5b58\u6c60\u7ed3\u6784\u2014\u2014<code>ngx_pool_t<\/code>\u3002\u6bcf\u4e2a\u8fde\u63a5\u3001\u6bcf\u4e2a\u8bf7\u6c42\u90fd\u4ece\u6c60\u91cc\u5206\u914d\u5185\u5b58\u3002\u6c60\u7ed3\u6784\u91cc\u6709\u4e00\u4e2a\u5b57\u6bb5\u53eb<code>cleanup<\/code>\uff0c\u5b83\u6307\u5411\u4e00\u4e2a\u94fe\u8868\uff0c\u94fe\u8868\u7684\u6bcf\u4e2a\u8282\u70b9\u91cc\u5b58\u7740\u4e00\u4e2a\u51fd\u6570\u6307\u9488\uff08<code>handler<\/code>\uff09\u548c\u4e00\u4e2a\u53c2\u6570\uff08<code>data<\/code>\uff09\u3002<strong>\u5f53\u6c60\u88ab\u9500\u6bc1\u65f6\uff0cNGINX\u4f1a\u904d\u5386\u8fd9\u4e2a\u94fe\u8868\uff0c\u4f9d\u6b21\u8c03\u7528\u6240\u6709handler\u3002<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">typedef void (*ngx_pool_cleanup_pt)(void *data);\n\nstruct ngx_pool_cleanup_s {\n    ngx_pool_cleanup_pt   handler;\n    void                 *data;\n    ngx_pool_cleanup_t   *next;\n};<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u653b\u51fb\u8005\u80fd\u628a\u8fd9\u4e2a<code>cleanup<\/code>\u6307\u9488\u6539\u6389\uff0c\u8ba9\u5b83\u6307\u5411\u81ea\u5df1\u7cbe\u5fc3\u6784\u9020\u7684\u5047\u94fe\u8868\u2014\u2014<strong>\u90a3\u6c60\u9500\u6bc1\u7684\u90a3\u4e00\u523b\uff0c\u5c31\u662f\u4efb\u610f\u4ee3\u7801\u6267\u884c\u7684\u90a3\u4e00\u523b\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u8def\u5f84\u4e0a\u6a2a\u7740\u597d\u51e0\u5ea7\u5927\u5c71\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u8986\u76d6\u5230<code>cleanup<\/code>\uff08\u504f\u79fb64\u5b57\u8282\uff09\uff0c\u4f60\u5f97\u5148\u628a\u524d\u9762\u7684<code>d<\/code>\u3001<code>max<\/code>\u3001<code>current<\/code>\u3001<code>chain<\/code>\u3001<code>large<\/code>\u5168\u90e8\u78be\u8fc7\u53bb\u3002\u8fd9\u4e9b\u5b57\u6bb5\u5982\u679c\u88ab\u6a61\u76ae\u5b50\u5f39\u6253\u70c2\u2014\u2014\u4e5f\u5c31\u662f\u88ab\u4f60\u7684URI\u5b89\u5168\u5b57\u7b26\u586b\u6210\u5783\u573e\u503c\u2014\u2014\u6c60\u5206\u914d\u5668\u5728\u540e\u7eed\u4efb\u4f55\u4e00\u6b21\u5185\u5b58\u64cd\u4f5c\u4e2d\u90fd\u4f1a\u7acb\u523bcrash\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f60\u8fd8\u6ca1\u8d70\u5230<code>cleanup<\/code>\uff0c\u5148\u6b7b\u5728\u4e86\u8def\u4e0a\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6. \u5806\u98ce\u6c34\uff1a\u4e00\u573a\u7cbe\u5fc3\u7f16\u6392\u7684\u65f6\u95f4\u5dee\u624b\u672f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u600e\u4e48\u7ed5\u8fc7\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u653b\u51fb\u8005\u796d\u51fa\u4e86\u4e00\u4e2a\u582a\u79f0\u4f18\u96c5\u7684\u65b9\u6848\u3002\u5b83\u5229\u7528\u4e86<strong>\u8de8\u8bf7\u6c42\u7684\u5806\u5e03\u5c40\u63a7\u5236<\/strong>\u2014\u2014\u6216\u8005\u4f60\u53ef\u4ee5\u53eb\u5b83\u201d\u5806\u98ce\u6c34\u201d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u601d\u8def\u662f\u8fd9\u6837\u7684\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u7b2c\u4e00\u6b65<\/strong>\uff1a\u5f00\u4e00\u4e2a\u8fde\u63a5A\uff0c\u53d1\u9001<strong>\u4e0d\u5b8c\u6574\u7684<\/strong>HTTP\u5934\u90e8\u3002NGINX\u4f1a\u4e3a\u8fd9\u4e2a\u8fde\u63a5\u5206\u914d\u4e00\u4e2a\u8bf7\u6c42\u6c60\uff0c\u4f46\u56e0\u4e3a\u5934\u90e8\u6ca1\u53d1\u5b8c\uff0c\u8bf7\u6c42\u8fd8\u6ca1\u6b63\u5f0f\u5f00\u59cb\u5904\u7406\u3002\u8fd9\u4e2a\u6c60\u5c31\u5728\u5806\u4e0a\u7a33\u7a33\u5730\u5360\u7740\u4f4d\u7f6e\uff0c\u7d27\u90bb\u7740\u653b\u51fb\u8005\u60f3\u8981\u8986\u76d6\u7684\u76ee\u6807\u533a\u57df\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u7b2c\u4e8c\u6b65<\/strong>\uff1a\u5f00\u7b2c\u4e8c\u4e2a\u8fde\u63a5B\u3002NGINX\u4e3aB\u5206\u914d\u4e00\u4e2a\u65b0\u7684\u8bf7\u6c42\u6c60\u3002\u7531\u4e8e\u5806\u5206\u914d\u7684\u987a\u5e8f\u6027\uff0c<strong>B\u7684\u6c60\u521a\u597d\u7d27\u6328\u7740A\u7684\u6c60<\/strong>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u7b2c\u4e09\u6b65<\/strong>\uff1a\u628aA\u7684\u5934\u90e8\u8865\u5168\uff0c\u89e6\u53d1<code>rewrite<\/code>+<code>set<\/code>\u7684\u6ea2\u51fa\u3002\u6ea2\u51fa\u7684\u6570\u636e\u4eceA\u7684\u6c60\u51b2\u51fa\u6765\uff0c\u76f4\u63a5\u8986\u76d6\u5230B\u7684\u6c60\u5934\u90e8\u2014\u2014\u7cbe\u51c6\u547d\u4e2dB\u6c60\u7684<code>cleanup<\/code>\u6307\u9488\u6240\u5728\u7684\u4f4d\u7f6e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u7b2c\u56db\u6b65<\/strong>\uff1a\u7acb\u523b\u5173\u95ed\u8fde\u63a5B\u3002NGINX\u5f00\u59cb\u9500\u6bc1B\u7684\u6c60\uff0c\u904d\u5386<code>cleanup<\/code>\u94fe\u8868\u2014\u2014\u800c\u6b64\u65f6\u7684<code>cleanup<\/code>\u6307\u9488\uff0c\u5df2\u7ecf\u662f\u653b\u51fb\u8005\u901a\u8fc7\u6ea2\u51fa\u5199\u8fdb\u53bb\u7684\u503c\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u91cc\u6700\u5de7\u5999\u7684\u662f\uff1a<strong>\u9500\u6bc1\u6c60\u7684\u65f6\u5019\uff0cNGINX\u53ea\u904d\u5386<code>cleanup<\/code>\u94fe\u8868\uff0c\u4e0d\u4f1a\u53bb\u78b0\u90a3\u4e9b\u88ab\u6a61\u76ae\u5b50\u5f39\u6253\u70c2\u7684\u6c60\u5143\u6570\u636e\u5b57\u6bb5\u3002<\/strong>&nbsp;\u4f60\u4e0d\u9700\u8981\u5b83\u4eec\u5b8c\u597d\uff0c\u4f60\u53ea\u9700\u8981\u5b83\u4eec\u5728\u4f60\u5230\u8fbe\u7ec8\u70b9\u4e4b\u524d\u4e0d\u60f9\u4e8b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u662f\u201d\u65f6\u95f4\u5dee\u624b\u672f\u201d\u7684\u7cbe\u9ad3\u2014\u2014<strong>\u5728\u5783\u573e\u503c\u88ab\u4f7f\u7528\u4e4b\u524d\uff0c\u8ba9\u6c60\u5148\u88ab\u9500\u6bc1\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">7. \u6a61\u76ae\u5b50\u5f39\u600e\u4e48\u53d8\u6210\u771f\u5b50\u5f39\uff1f\u2014\u2014POST\u8bf7\u6c42\u7684\u201d\u6697\u5ea6\u9648\u4ed3\u201d<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u53ea\u5269\u6700\u540e\u4e00\u4e2a\u95ee\u9898\u4e86\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u653b\u51fb\u8005\u7528\u6ea2\u51fa\u8986\u76d6\u4e86<code>cleanup<\/code>\u6307\u9488\u3002\u4f46\u4ed6\u53ea\u80fd\u5199URI\u5b89\u5168\u5b57\u7b26\u2014\u2014\u5b57\u6bcd\u3001\u6570\u5b57\u3001\u767e\u5206\u53f7\u7f16\u7801\u3002\u4e00\u4e2a\u771f\u6b63\u7684\u5185\u5b58\u5730\u5740\u91cc\u5fc5\u7136\u6709\u4e0d\u53ef\u6253\u5370\u7684\u5b57\u8282\uff0c\u751a\u81f3\u6709<code>\\x00<\/code>\u3002\u4f60\u600e\u4e48\u7528\u6709\u9650\u7684\u5b57\u6bcd\u8868\u5199\u51fa\u4e00\u4e2a\u6709\u6548\u7684\u5730\u5740\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u7b54\u6848\u662f\uff1a\u4f60\u4e0d\u9700\u8981\u81ea\u5df1\u5199\u3002\u4f60\u8ba9\u522b\u4eba\u5e2e\u4f60\u5199\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u653b\u51fb\u8005\u63d0\u524d\u53d1\u9001\u4e86\u5927\u91cfPOST\u8bf7\u6c42\u3002POST\u8bf7\u6c42\u7684body\u4e0d\u50cfURI\u90a3\u6837\u88ab\u4e25\u683c\u89e3\u6790\u2014\u2014<strong>\u5b83\u53ef\u4ee5\u5305\u542b\u4efb\u610f\u4e8c\u8fdb\u5236\u6570\u636e\uff0c\u5305\u62ecnull\u5b57\u8282\u3001\u4e0d\u53ef\u6253\u5370\u5b57\u7b26\u3001\u5b8c\u6574\u7684\u5185\u5b58\u5730\u5740\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ed6\u5728POST body\u91cc\u7cbe\u5fc3\u6784\u9020\u4e86\u4e00\u4e2a\u5047\u7684<code>ngx_pool_cleanup_s<\/code>\u7ed3\u6784\uff1ahandler\u6307\u5411libc\u7684<code>system<\/code>\u51fd\u6570\uff0cdata\u6307\u5411\u4e00\u4e32\u547d\u4ee4\u5b57\u7b26\u4e32\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e9b\u5047\u7ed3\u6784\u88ab\u55b7\u5230\u5806\u4e0a\uff0c\u5927\u91cf\u55b7\u6d12\u3002\u7531\u4e8eNGINX\u7684\u5806\u5e03\u5c40\u9ad8\u5ea6\u786e\u5b9a\uff0c\u653b\u51fb\u8005\u53ef\u4ee5\u7cbe\u786e\u8ba1\u7b97\u5b83\u4eec\u843d\u5728\u54ea\u4e2a\u5730\u5740\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7136\u540e\uff0c\u4ed6\u5728\u8fd9\u4e9b\u5730\u5740\u4e2d<strong>\u7b5b\u9009<\/strong>\u51fa\u4e00\u4e2a\u7279\u6b8a\u7684\u2014\u2014\u8fd9\u4e2a\u5730\u5740\u7684\u503c\uff0c\u78b0\u5de7\u53ea\u7528\u5230\u4e86URI\u5b89\u5168\u5b57\u7b26\u8303\u56f4\u5185\u7684\u5b57\u8282\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4ed6\u4e0d\u9700\u8981\u201d\u5199\u201d\u4e00\u4e2a\u5730\u5740\u3002\u4ed6\u53ea\u9700\u8981\u201d\u9009\u201d\u4e00\u4e2a\u5730\u5740\u2014\u2014\u4e00\u4e2a\u5df2\u7ecf\u5728\u5806\u4e0a\u3001\u6070\u597d\u80fd\u7528\u52a0\u53f7\u548c\u767e\u5206\u53f7\u8868\u793a\u7684\u5730\u5740\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6ea2\u51fa\u53d1\u751f\u65f6\uff0c\u4ed6\u628a\u8fd9\u4e2a\u201d\u5b89\u5168\u201d\u7684\u5730\u5740\u5199\u8fdb<code>cleanup<\/code>\u6307\u9488\u3002\u8fde\u63a5\u5173\u95ed\uff0c\u6c60\u9500\u6bc1\uff0c<code>cleanup<\/code>\u94fe\u8868\u88ab\u904d\u5386\uff0chandler\u88ab\u6267\u884c\u3002<code>system(\"\u4f60\u6ce8\u5165\u7684\u547d\u4ee4\")<\/code>\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4ee3\u7801\u6267\u884c\u4e86\u3002<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">8. \u8106\u5f31\u6027\u7684\u5e95\u5c42\u903b\u8f91\uff1a\u4e3a\u4ec0\u4e48\u201d\u5047\u8bbe\u201d\u662f\u4e07\u6076\u4e4b\u6e90<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u56de\u987e\u6574\u4e2a\u94fe\u6761\uff0c\u4f60\u4f1a\u53d1\u73b0\u4e00\u4e2a\u4ee4\u4eba\u4e0d\u5b89\u7684\u4e8b\u5b9e\uff1a<strong>\u6bcf\u4e00\u6b65\u5355\u72ec\u770b\uff0c\u90fd\u662f\u5408\u7406\u7684\u3002<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e24\u904d\u626b\u63cf\u4f18\u5316\u5185\u5b58\u5206\u914d\uff1f\u5408\u7406\uff0c\u9ad8\u6548\u3002<\/li>\n\n\n\n<li>\u7528<code>is_args<\/code>\u6807\u5fd7\u4f4d\u8bb0\u5f55\u662f\u5426\u5728\u67e5\u8be2\u53c2\u6570\u4e2d\uff1f\u5408\u7406\uff0c\u7b80\u6d01\u3002<\/li>\n\n\n\n<li>\u5b50\u5f15\u64ce\u4ece\u96f6\u521d\u59cb\u5316\u907f\u514d\u6c61\u67d3\uff1f\u5408\u7406\uff0c\u5e72\u51c0\u3002<\/li>\n\n\n\n<li>\u591a\u8fdb\u7a0bfork\u4fdd\u8bc1\u7a33\u5b9a\u6027\uff1f\u5408\u7406\uff0c\u4f18\u96c5\u3002<\/li>\n\n\n\n<li>URI\u4e25\u683c\u8fc7\u6ee4\u9632\u6b62\u6ce8\u5165\uff1f\u5408\u7406\uff0c\u5b89\u5168\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4f46\u6240\u6709\u8fd9\u4e9b\u201d\u5408\u7406\u201d\u53e0\u52a0\u5728\u4e00\u8d77\uff0c\u53d8\u6210\u4e86\u4e00\u4e2a\u81f4\u547d\u7684\u6f0f\u6d1e\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6839\u6e90\u5728\u4e8e\u4e00\u4e2a<strong>\u8de8\u8d8a\u591a\u5c42\u62bd\u8c61\u7684\u5047\u8bbe\u4e0d\u4e00\u81f4<\/strong>\uff1a\u811a\u672c\u5f15\u64ce\u5047\u8bbe\u6807\u5fd7\u4f4d\u5728\u4e24\u6b21\u626b\u63cf\u4e4b\u95f4\u4e0d\u4f1a\u6539\u53d8\uff0c\u4f46<code>rewrite<\/code>\u6307\u4ee4\u7684\u8bbe\u8ba1\u5047\u8bbe\u5b83\u8bbe\u7f6e\u7684\u6807\u5fd7\u4f4d\u4f1a\u5bf9\u540e\u7eed\u6307\u4ee4\u4ea7\u751f\u5f71\u54cd\uff0c\u800c<code>set<\/code>\u6307\u4ee4\u53c8\u5047\u8bbe\u5b83\u7528\u7684\u5b50\u5f15\u64ce\u662f\u5e72\u51c0\u7684\u526f\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e09\u4e2a\u5047\u8bbe\u5f7c\u6b64\u77db\u76fe\u3002\u800c\u90a3\u4e2a2008\u5e74\u7684commit\uff0c\u6070\u597d\u89e6\u53d1\u4e86\u8fd9\u4e2a\u77db\u76fe\u7684\u5f00\u5173\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u8fd9\u5c31\u662f\u4e3a\u4ec0\u4e48\u6700\u5371\u9669\u7684\u6f0f\u6d1e\uff0c\u5f80\u5f80\u4e0d\u662f\u67d0\u4e00\u4e2a\u7a0b\u5e8f\u5458\u5199\u51fa\u4e86\u70c2\u4ee3\u7801\uff0c\u800c\u662f\u4e00\u7fa4\u4f18\u79c0\u7684\u7a0b\u5e8f\u5458\u5404\u81ea\u5199\u51fa\u4e86\u201d\u6b63\u786e\u201d\u7684\u4ee3\u7801\uff0c\u7136\u540e\u8fd9\u4e9b\u4ee3\u7801\u5728\u8fd0\u884c\u65f6\u76f8\u9047\u4e86\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c31\u50cf\u4e09\u8f86\u9075\u5b88\u4ea4\u901a\u89c4\u5219\u7684\u8f66\uff0c\u5728\u5341\u5b57\u8def\u53e3\u540c\u65f6\u5230\u8fbe\u3002\u6bcf\u8f86\u8f66\u90fd\u5f00\u5728\u81ea\u5df1\u7684\u7eff\u706f\u4e0b\u2014\u2014\u4f46\u8def\u53e3\u7684\u8bbe\u8ba1\u8005\u4ece\u6765\u6ca1\u60f3\u8fc7\uff0c\u4e09\u4e2a\u65b9\u5411\u7684\u7eff\u706f\u4f1a\u540c\u65f6\u4eae\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">9. \u6700\u540e\u7684\u53cd\u601d\uff1a\u6211\u4eec\u68c0\u89c6\u4ee3\u7801\u7684\u65b9\u5f0f\uff0c\u53ef\u80fd\u4ece\u6839\u672c\u4e0a\u5c31\u662f\u9519\u7684<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u7bc7\u6587\u7ae0\u4e0d\u662f\u6765\u5632\u7b11NGINX\u7684\u3002\u6070\u6070\u76f8\u53cd\u2014\u2014NGINX\u662f\u8fc7\u53bb\u4e8c\u5341\u5e74\u91cc\u6700\u6210\u529f\u3001\u6700\u7a33\u5065\u7684\u57fa\u7840\u8f6f\u4ef6\u4e4b\u4e00\u3002\u5b83\u7684\u4ee3\u7801\u8d28\u91cf\u653e\u5728\u6574\u4e2a\u5f00\u6e90\u4e16\u754c\u91cc\uff0c\u90fd\u582a\u79f0\u6807\u6746\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6b63\u56e0\u5982\u6b64\uff0c\u8fd9\u4e2a\u6f0f\u6d1e\u624d\u8ba9\u4eba\u810a\u80cc\u53d1\u51c9\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u8fdeNGINX\u2014\u2014\u88ab\u90a3\u4e48\u591a\u4f01\u4e1a\u3001\u90a3\u4e48\u591a\u5b89\u5168\u7814\u7a76\u5458\u3001\u90a3\u4e48\u591a\u597d\u5947\u7684\u773c\u775b\u5ba1\u89c6\u8fc7\u7684\u4ee3\u7801\u2014\u2014\u90fd\u53ef\u4ee5\u8ba9\u4e00\u4e2a\u6f0f\u6d1e\u6f5c\u4f0f18\u5e74\uff0c\u90a3\u6211\u4eec\u8fd8\u6709\u591a\u5c11\u57fa\u7840\u8bbe\u65bd\uff0c\u662f\u5728\u88f8\u5954\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f4\u8ba9\u4eba\u4e0d\u5b89\u7684\u662f\uff0c\u8fd9\u4e2a\u6f0f\u6d1e\u4e0d\u662f\u88ab\u4eba\u7c7b\u53d1\u73b0\u7684\uff0c\u800c\u662f\u88ab<strong>\u4e00\u4e2a\u81ea\u52a8\u5316\u7cfb\u7edf<\/strong>\u53d1\u73b0\u7684\u3002\u5b83\u4e0d\u9700\u8981\u7761\u89c9\uff0c\u4e0d\u9700\u8981\u559d\u5496\u5561\uff0c\u4e0d\u9700\u8981\u572830\u4e07\u884c\u6e90\u7801\u4e2d\u8ff7\u5931\u65b9\u5411\u3002\u5b83\u53ea\u662f\u5728\u516d\u5c0f\u65f6\u5185\uff0c\u6309\u81ea\u5df1\u7684\u65b9\u5f0f\u628a\u4ee3\u7801\u201d\u8bfb\u201d\u4e86\u4e00\u904d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u4eba\u7c7breview\u4ee3\u7801\u7684\u65b9\u5f0f\uff0c\u4e5f\u8bb8\u4ece\u4e00\u5f00\u59cb\u5c31\u9519\u4e86\u3002<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u4e60\u60ef\u4e8e\u76ef\u7740diff\u2014\u2014\u201d\u8fd9\u6b21\u6539\u4e86\u54ea\u51e0\u884c\uff1f\u201d\u6211\u4eec\u68c0\u67e5\u65b0\u4ee3\u7801\u7684\u903b\u8f91\uff0c\u6d4b\u8bd5\u65b0\u529f\u80fd\u662f\u5426\u6b63\u5e38\u3002\u4f46\u51e0\u4e4e\u6ca1\u6709\u4eba\u4f1a\u95ee\uff1a<strong>\u8fd9\u4e2a\u65b0\u53d8\u91cf\uff0c\u5b83\u5bf9\u5341\u516b\u5e74\u524d\u90a3\u6bb5\u8fd0\u884c\u7684\u4ee3\u7801\u610f\u5473\u7740\u4ec0\u4e48\uff1f<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6f0f\u6d1e\u4e0d\u5728diff\u91cc\u3002\u6f0f\u6d1e\u5728diff\u548c\u5b83\u5468\u56f4\u6c89\u9ed8\u7684\u5386\u53f2\u4e4b\u95f4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u81ea\uff1ahttps:\/\/www.zhihu.com\/collecti&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27],"tags":[],"class_list":["post-111","post","type-post","status-publish","format-standard","hentry","category-27"],"_links":{"self":[{"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/posts\/111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/comments?post=111"}],"version-history":[{"count":1,"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/posts\/111\/revisions"}],"predecessor-version":[{"id":112,"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/posts\/111\/revisions\/112"}],"wp:attachment":[{"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/media?parent=111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/categories?post=111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xiuxiejiang.com\/index.php\/wp-json\/wp\/v2\/tags?post=111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}