{"id":361,"date":"2021-05-01T21:50:14","date_gmt":"2021-05-01T13:50:14","guid":{"rendered":"http:\/\/112.124.66.68\/?p=361"},"modified":"2021-05-01T21:50:14","modified_gmt":"2021-05-01T13:50:14","slug":"nginx%e6%98%af%e5%a6%82%e4%bd%95%e5%a4%84%e7%90%86%e4%b8%80%e4%b8%aahttp%e8%af%b7%e6%b1%82%e7%9a%84%e5%91%a2%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/sanlangcode.com\/index.php\/2021\/05\/01\/nginx%e6%98%af%e5%a6%82%e4%bd%95%e5%a4%84%e7%90%86%e4%b8%80%e4%b8%aahttp%e8%af%b7%e6%b1%82%e7%9a%84%e5%91%a2%ef%bc%9f\/","title":{"rendered":"Nginx\u662f\u5982\u4f55\u5904\u7406\u4e00\u4e2aHTTP\u8bf7\u6c42\u7684\u5462\uff1f"},"content":{"rendered":"\n<p> Nginx \u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684 Web \u670d\u52a1\u5668\uff0c\u80fd\u591f\u540c\u65f6\u5904\u7406\u5927\u91cf\u7684\u5e76\u53d1\u8bf7\u6c42\u3002\u5b83\u7ed3\u5408\u591a\u8fdb\u7a0b\u673a\u5236\u548c\u5f02\u6b65\u673a\u5236 \uff0c\u5f02\u6b65\u673a\u5236\u4f7f\u7528\u7684\u662f\u5f02\u6b65\u975e\u963b\u585e\u65b9\u5f0f \uff0c\u63a5\u4e0b\u6765\u5c31\u7ed9\u5927\u5bb6\u4ecb\u7ecd\u4e00\u4e0b Nginx \u7684\u591a\u7ebf\u7a0b\u673a\u5236\u548c\u5f02\u6b65\u975e\u963b\u585e\u673a\u5236\u3002<br>1\u3001\u591a\u8fdb\u7a0b\u673a\u5236<br>\u670d\u52a1\u5668\u6bcf\u5f53\u6536\u5230\u4e00\u4e2a\u5ba2\u6237\u7aef\u65f6\uff0c\u5c31\u6709 \u670d\u52a1\u5668\u4e3b\u8fdb\u7a0b \uff08 master process \uff09\u751f\u6210\u4e00\u4e2a \u5b50\u8fdb\u7a0b\uff08 workeprocess \uff09\u51fa\u6765\u548c\u5ba2\u6237\u7aef\u5efa\u7acb\u8fde\u63a5\u8fdb\u884c\u4ea4\u4e92\uff0c\u76f4\u5230\u8fde\u63a5\u65ad\u5f00\uff0c\u8be5\u5b50\u8fdb\u7a0b\u5c31\u7ed3\u675f\u4e86\u3002\u4f7f\u7528\u8fdb\u7a0b\u7684\u597d\u5904\u662f\u5404\u4e2a\u8fdb\u7a0b\u4e4b\u95f4\u76f8\u4e92\u72ec\u7acb\uff0c\u4e0d\u9700\u8981\u52a0\u9501\uff0c\u51cf\u5c11\u4e86\u4f7f\u7528\u9501\u5bf9\u6027\u80fd\u9020\u6210\u5f71\u54cd\uff0c\u540c\u65f6\u964d\u4f4e\u7f16\u7a0b\u7684\u590d\u6742\u5ea6\uff0c\u964d\u4f4e\u5f00\u53d1\u6210\u672c\u3002\u5176\u6b21\uff0c\u91c7\u7528\u72ec\u7acb\u7684\u8fdb\u7a0b\uff0c\u53ef\u4ee5\u8ba9\u8fdb\u7a0b\u4e92\u76f8\u4e4b\u95f4\u4e0d\u4f1a\u5f71\u54cd \uff0c\u5982\u679c\u4e00\u4e2a\u8fdb\u7a0b\u53d1\u751f\u5f02\u5e38\u9000\u51fa\u65f6\uff0c\u5176\u5b83\u8fdb\u7a0b\u6b63\u5e38\u5de5\u4f5c\uff0c master \u8fdb\u7a0b\u5219\u5f88\u5feb\u542f\u52a8\u65b0\u7684 worker \u8fdb\u7a0b\uff0c\u786e\u4fdd\u670d\u52a1\u4e0d\u4f1a\u4e2d\u65ad\uff0c\u4ece\u800c\u5c06\u98ce\u9669\u964d\u5230\u6700\u4f4e\u3002<strong>\u7f3a\u70b9<\/strong>\u662f\u64cd\u4f5c\u7cfb\u7edf\u751f\u6210\u4e00\u4e2a\u5b50\u8fdb\u7a0b\u9700\u8981\u8fdb\u884c \u5185\u5b58\u590d\u5236\u7b49\u64cd\u4f5c\uff0c\u5728\u8d44\u6e90\u548c\u65f6\u95f4\u4e0a\u4f1a\u4ea7\u751f\u4e00\u5b9a\u7684\u5f00\u9500\u3002\u5f53\u6709\u5927\u91cf\u8bf7\u6c42\u65f6\uff0c\u4f1a\u5bfc\u81f4\u7cfb\u7edf\u6027\u80fd\u4e0b\u964d \u3002<br>2\u3001\u5f02\u6b65\u975e\u963b\u585e\u673a\u5236<br>\u6bcf\u4e2a\u5de5\u4f5c\u8fdb\u7a0b \u4f7f\u7528 \u5f02\u6b65\u975e\u963b\u585e\u65b9\u5f0f \uff0c\u53ef\u4ee5\u5904\u7406 \u591a\u4e2a\u5ba2\u6237\u7aef\u8bf7\u6c42 \u3002\u5f53\u67d0\u4e2a \u5de5\u4f5c\u8fdb\u7a0b \u63a5\u6536\u5230\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\u4ee5\u540e\uff0c\u8c03\u7528 IO \u8fdb\u884c\u5904\u7406\uff0c\u5982\u679c\u4e0d\u80fd\u7acb\u5373\u5f97\u5230\u7ed3\u679c\uff0c\u5c31\u53bb \u5904\u7406\u5176\u4ed6\u8bf7\u6c42 \uff08\u5373\u4e3a \u975e\u963b\u585e \uff09\uff1b\u800c \u5ba2\u6237\u7aef \u5728\u6b64\u671f\u95f4\u4e5f \u65e0\u9700\u7b49\u5f85\u54cd\u5e94 \uff0c\u53ef\u4ee5\u53bb\u5904\u7406\u5176\u4ed6\u4e8b\u60c5\uff08\u5373\u4e3a \u5f02\u6b65\uff09\u3002\u5f53 IO \u8fd4\u56de\u65f6\uff0c\u5c31\u4f1a\u901a\u77e5\u6b64 \u5de5\u4f5c\u8fdb\u7a0b \uff1b\u8be5\u8fdb\u7a0b\u5f97\u5230\u901a\u77e5\uff0c\u6682\u65f6 \u6302\u8d77 \u5f53\u524d\u5904\u7406\u7684\u4e8b\u52a1\u53bb \u54cd\u5e94\u5ba2\u6237\u7aef\u8bf7\u6c42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nginx \u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684 We&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":357,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"class_list":["post-361","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nginx"],"_links":{"self":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/361","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/comments?post=361"}],"version-history":[{"count":0,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/posts\/361\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/media\/357"}],"wp:attachment":[{"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/media?parent=361"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/categories?post=361"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanlangcode.com\/index.php\/wp-json\/wp\/v2\/tags?post=361"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}