{"id":12099,"date":"2020-11-05T14:50:48","date_gmt":"2020-11-05T05:50:48","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=12099"},"modified":"2023-05-27T21:36:48","modified_gmt":"2023-05-27T12:36:48","slug":"%e3%80%90ngnix%e3%80%91%e6%a6%82%e8%a6%81","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=12099","title":{"rendered":"\u3010nginx\u3011\u57fa\u672c\u3001\u5909\u6570(\u30d3\u30eb\u30c9\u30a4\u30f3\u5909\u6570)"},"content":{"rendered":"<p>\u8fd1\u5e74\u6025\u901f\u306b\u30b7\u30a7\u30a2\u3092\u4f38\u3070\u3057\u3066\u3044\u307e\u3059\u3002C10K\u554f\u984c\u3092\u958b\u767a\u3055\u308c\u305f\u3053\u3068\u304c\u5f71\u97ff\u3057\u3066\u3044\u308b\u3068\u8a00\u308f\u308c\u307e\u3059\u3002<\/p>\n<h2>C10K\u554f\u984c\u3068\u306f\uff1f<\/h2>\n<p>1\u53f0\u306e\u30b5\u30fc\u30d0\u304c1\u4e07\u3082\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u540c\u6642\u306e\u51e6\u7406\u3092\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u51e6\u7406\u304c\u8ffd\u3044\u3064\u304b\u306a\u3044\u554f\u984c\u3002nginx\u306f\u3001\u30a4\u30d9\u30f3\u30c8\u99c6\u52d5\u3001I\/O Multiplexing\u3001\u30ce\u30f3\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0I\/O\u3001\u975e\u540c\u671fI\/O\u3068\u3044\u3046\u30c6\u30af\u30cb\u30c3\u30af\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3053\u306e\u554f\u984c\u3092\u89e3\u6d88\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u7279\u5fb4<\/h2>\n<h3>Apache\u306b\u6bd4\u3079\u3066\u5927\u91cf\u30a2\u30af\u30bb\u30b9\u51e6\u7406\u304c\u5f97\u610f<\/h3>\n<p>Apache\u306e\u5834\u5408\u306f\u30011\u3064\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u30b9\u30ec\u30c3\u30c9\u3092\u5272\u308a\u5f53\u3066\u308b\u306e\u3067\u5927\u91cf\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u634c\u304f\u306e\u304c\u82e6\u624b\u3002<\/p>\n<h3>\u9ad8\u901f\u3067\u8efd\u91cf<\/h3>\n<p>\u30e1\u30e2\u30ea\u3092\u7bc0\u7d04\u3067\u304d\u3001\u7d50\u679c\u3068\u3057\u3066\u5927\u91cf\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u3082\u8010\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u914d\u4fe1\u304c\u5f97\u610f<\/h3>\n<p>\u9759\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u914d\u4fe1\u304c\u5f97\u610f\u3067\u3059\u3002HTML\u3084\u753b\u50cf\u306a\u3069\u3092\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u304a\u304f\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u305d\u308c\u306b\u5bfe\u3057\u3066Apache\u306f\u52d5\u7684\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u51e6\u7406\u304c\u5f97\u610f\u3067\u3059\u3002<\/p>\n<h3>\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7<\/h3>\n<p>Starman\u3084Unicorn\u306a\u3069\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u306e\u524d\u306b\u914d\u7f6e\u3057\u3066\u30ea\u30d0\u30fc\u30b9\u30d7\u30ed\u30ad\u30b7\u3068\u3057\u3066\u52d5\u4f5c\u3055\u305b\u308b\u69cb\u6210\u3082\u975e\u5e38\u306b\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u3002\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u53d6\u308b\u3053\u3068\u3067\u3001\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u30b5\u30fc\u30d0\u306e\u8ca0\u8377\u3092\u4f4e\u6e1b\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h3>\u30ed\u30fc\u30c9\u30d0\u30e9\u30f3\u30b7\u30f3\u30b0<\/h3>\n<p>\u5404\u30b5\u30fc\u30d0\u3078\u306e\u8ca0\u8377\u3092\u5206\u6563\u3067\u304d\u308b\u3002<\/p>\n<h2>\u30a4\u30d9\u30f3\u30c8\u99c6\u52d5\u30e2\u30c7\u30eb<\/h2>\n<p>\u4f55\u304b\u3057\u3089\u306e\u30a4\u30d9\u30f3\u30c8\u304c\u767a\u751f\u3059\u308b\u307e\u3067\u5f85\u6a5f\u3057\u3066\u767a\u751f\u3057\u305f\u30a4\u30d9\u30f3\u30c8\u306b\u5fdc\u3058\u3066\u5b9a\u3081\u3089\u308c\u305f\u624b\u9806\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u5b9a\u3081\u3089\u308c\u305f\u624b\u9806\u306e\u3053\u3068\u3092<span style=\"color: #ff0000;\"><strong>\u300c\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u300d<\/strong><\/span>\u3068\u547c\u3073\u307e\u3059\u3002\u975e\u5e38\u306b\u5c11\u306a\u3044\u30d7\u30ed\u30bb\u30b9\u6570\u3067\u5927\u91cf\u306e\u540c\u6642\u51e6\u7406\u3092\u634c\u3051\u308b\u306e\u3067\u3001\u6027\u80fd\u304c\u52a3\u5316\u3057\u306b\u304f\u3044\u3067\u3059\u3002<\/p>\n<h3>\u30a4\u30d9\u30f3\u30c8\u306e\u7a2e\u985e<\/h3>\n<h4>\u30b7\u30b9\u30c6\u30e0\u30b3\u30fc\u30eb<\/h4>\n<ul>\n<li>epoll<\/li>\n<li>inotify<\/li>\n<li>sigaction<\/li>\n<\/ul>\n<h4>\u30a4\u30d9\u30f3\u30c8\u99c6\u52d5\u51e6\u7406\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea<\/h4>\n<ul>\n<li>libevent<\/li>\n<li>libuv<\/li>\n<\/ul>\n<h3>\u30a4\u30d9\u30f3\u30c8\u306e\u4f8b<\/h3>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u63a5\u7d9a\u8981\u6c42<\/p>\n<h2>\u30de\u30b9\u30bf\u30d7\u30ed\u30bb\u30b9\u3068\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9<\/h2>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-15538\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2020\/11\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-12-09-16.46.23.png\" alt=\"\" width=\"978\" height=\"564\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2020\/11\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-12-09-16.46.23.png 978w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2020\/11\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-12-09-16.46.23-300x173.png 300w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2020\/11\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-12-09-16.46.23-768x443.png 768w\" sizes=\"(max-width: 978px) 100vw, 978px\" \/><\/p>\n<h3>\u30de\u30b9\u30bf\u30d7\u30ed\u30bb\u30b9<\/h3>\n<p>\u4e3b\u306a\u4ed5\u4e8b\u306f\u3001\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u306e\u5236\u5fa1\u3068\u7ba1\u7406\u3067\u3059\u3002\u30b7\u30b0\u30ca\u30eb\u3092\u9001\u3089\u308c\u3066\u51e6\u7406\u3057\u307e\u3059\u3002\uff08\u4f8b\u3048\u3070\u3001\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u518d\u8aad\u307f\u8fbc\u307f\u306e\u30b7\u30b0\u30ca\u30eb\u3092\u53d7\u3051\u3066\u518d\u8d77\u52d5\u3059\u308b\u306a\u3069\u3002\uff09<\/p>\n<h3>\u5404\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9<\/h3>\n<p>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u63a5\u7d9a\u8981\u6c42\u306b\u59cb\u307e\u308b\u4e00\u9023\u306e\u51e6\u7406\u3092\u30a4\u30d9\u30f3\u30c8\u99c6\u52d5\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002\u901a\u5e38\u30b7\u30f3\u30b0\u30eb\u30b9\u30ec\u30c3\u30c9\u3067\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001I\/O Multiplexing\u3001\u30ce\u30f3\u30d6\u30ed\u30c3\u30ad\u30f3\u30b0I\/O\u306a\u3069\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u8907\u6570\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u306e\u8981\u6c42\u3092\u540c\u6642\u4e26\u884c\u3067\u51e6\u7406\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u30ef\u30fc\u30ab\u30fc\u30d7\u30ed\u30bb\u30b9\u81ea\u4f53\u3082\u8907\u6570\u8d77\u52d5\u304c\u53ef\u80fd\u306a\u306e\u3067\u5bb9\u6613\u306b\u30b9\u30b1\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30d3\u30eb\u30c9\u30a4\u30f3\u5909\u6570<\/h2>\n<p>nginx\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3001\u300c$\u300d\u3092\u3064\u3051\u308b\u3068\u5909\u6570\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u30e6\u30fc\u30b6\u30fc\u3067\u76f4\u63a5\u5b9a\u7fa9\u3082\u3067\u304d\u307e\u3059\u304c\u3001\u300c\u30d3\u30eb\u30c9\u30a4\u30f3\u5909\u6570\u300d\u3082\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>$remote_addr<\/h3>\n<p><span style=\"color: #ff0000;\"><strong>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8(\u30ea\u30af\u30a8\u30b9\u30c8\u5143)\u306eIP\u30a2\u30c9\u30ec\u30b9<\/strong><\/span>\u3092\u6307\u3057\u307e\u3059\u3002<\/p>\n<div>\n<h3>$uri<\/h3>\n<p>\u30d1\u30e9\u30e1\u30fc\u30bf\u306a\u3057\u306e\u30ea\u30af\u30a8\u30b9\u30c8URI\u3067\u3059\u3002<\/p>\n<div>\n<h3>$proxy_add_x_forwarded_for<\/h3>\n<\/div>\n<\/div>\n<div>nginx\u3067X-Forwarded-For\u30d8\u30c3\u30c0\u3092\u4ed8\u4e0e\u3059\u308b\u306e\u306b\u4fbf\u5229\u306a\u5909\u6570\uff08\u305f\u3060\u3057\u6ce8\u610f\u70b9\u306f\u3042\u308b\u3002\uff09<\/div>\n<div><\/div>\n<div>\n<h2>\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fdc\u3058\u3066\u5b9a\u7fa9\u3055\u308c\u308b\u5909\u6570<\/h2>\n<h3>$http_\u30d5\u30a3\u30fc\u30eb\u30c9\u540d(\u4f8b\u3048\u3070host\u306a\u3069\uff09<\/h3>\n<p>\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u306e\u5024\u3067\u3059\u3002<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u8fd1\u5e74\u6025\u901f\u306b\u30b7\u30a7\u30a2\u3092\u4f38\u3070\u3057\u3066\u3044\u307e\u3059\u3002C10K\u554f\u984c\u3092\u958b\u767a\u3055\u308c\u305f\u3053\u3068\u304c\u5f71\u97ff\u3057\u3066\u3044\u308b\u3068\u8a00\u308f\u308c\u307e\u3059\u3002 C10K\u554f\u984c\u3068\u306f\uff1f 1\u53f0\u306e\u30b5\u30fc\u30d0\u304c1\u4e07\u3082\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u540c\u6642\u306e\u51e6\u7406\u3092\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u51e6\u7406\u304c\u8ffd\u3044\u3064\u304b\u306a\u3044\u554f\u984c\u3002nginx\u306f\u3001\u30a4\u30d9\u30f3\u30c8 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[91],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12099"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12099"}],"version-history":[{"count":10,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12099\/revisions"}],"predecessor-version":[{"id":20374,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/12099\/revisions\/20374"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12099"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}