{"id":326059,"date":"2021-02-04T05:31:27","date_gmt":"2021-02-03T21:31:27","guid":{"rendered":"http:\/\/4563.org\/?p=326059"},"modified":"2021-02-04T05:31:27","modified_gmt":"2021-02-03T21:31:27","slug":"win-%e7%ab%af-nginx-%e5%a6%82%e4%bd%95%e7%bb%9f%e8%ae%a1%e6%b5%81%e9%87%8f%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=326059","title":{"rendered":"win \u7aef Nginx \u5982\u4f55\u7edf\u8ba1\u6d41\u91cf\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  win \u7aef Nginx \u5982\u4f55\u7edf\u8ba1\u6d41\u91cf\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : PepperEgg <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u76ee\u524d\u516c\u53f8\u5f00\u53d1\u4e00\u4e2a\u7a0b\u5e8f\uff0c\u9700\u8981\u7279\u5b9a\u573a\u666f\u542f ngixn\uff0cwindows \u7aef\u7684 nginix \u8c8c\u4f3c\u6ca1\u6709\u9009\u9879\u63a7\u5236\u53f0\u8f93\u51fa\u5427\uff0c\u4e5f\u6ca1\u6709\u6d41\u91cf\u7edf\u8ba1\u7684\u9009\u9879\u3002\u4ece access log \u91cc\u9762\u4e0b\u624b\u7684\u8bdd\uff0c\u4e5f\u662f\u4e00\u4e9b header \u4fe1\u606f\u3002\u3002\u3002\u611f\u89c9\u4e0d\u597d\u4e0b\u624b\u554a\uff0c\u6c42\u5927\u4f6c\u89e3\u7b54\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>13<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5217015\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : julyclyde <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5373\u4f7f linux\uff0c\u63a7\u5236\u53f0\u4e5f\u6ca1\u4ec0\u4e48\u8f93\u51fa\u554a<br \/>\u90fd\u662f\u4ece\u65e5\u5fd7\u7edf\u8ba1\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217016\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : eason1874 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7edf\u8ba1\u4ec0\u4e48\u6d41\u91cf\uff1f<\/p>\n<p>\u7528 OpenResty \u53ef\u4ee5\u5728\u65e5\u5fd7\u9636\u6bb5\u7edf\u8ba1\u4efb\u4f55\u4e1c\u897f\uff0c\u5305\u62ec\u8bf7\u6c42\u548c\u54cd\u5e94\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u7528 Nginx \u81ea\u8eab\u7684 mirror \u53ef\u4ee5\u628a\u8bf7\u6c42\u955c\u50cf\u53d1\u9001\u5230\u53e6\u4e00\u4e2a\u5730\u5740\uff0c\u4f46\u8fd9\u6837\u5c31\u7edf\u8ba1\u4e0d\u5230\u54cd\u5e94\u4fe1\u606f\uff0c\u8ddf rewrite \u4e00\u8d77\u914d\u7f6e\u7684\u65f6\u5019\u4e5f\u9ebb\u70e6\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217017\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : q1angch0u <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ngixn\/nginix \u662f\u5565                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217018\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : PolarBears <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u662f\u914d\u7f6e log_format \u6210 json \u683c\u5f0f\u8f93\u51fa\u5230\u6587\u4ef6,\u7136\u540e\u4f7f\u7528 filebeat \u8bfb\u53d6\u65e5\u5fd7\u6587\u4ef6\u8f93\u51fa\u5230 elasticsearch,\u4e4b\u540e\u53ef\u4ee5\u7528 kibana \u6216\u8005 grafana \u7edf\u8ba1\u6d41\u91cf                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217019\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : PolarBears <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8981\u7b80\u5355\u8f7b\u91cf\u7684\u8bdd\u5e94\u8be5\u7528 OpenResty \u6765\u505a\u6bd4\u8f83\u597d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217020\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Lee2019 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             lua \uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217021\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Lemeng <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Nginx..\u597d\u5427                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217022\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : julyclyde <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @PolarBears \u662f\u81ea\u5df1\u62fc\u4e00\u4e2a json \u5b57\u7b26\u4e32\u5417\uff1f\u5b66\u5230\u4e86\u3002\u786e\u5b9e\u6bd4\u7a7a\u683c\u5206\u5272\u8981\u597d\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217023\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : PolarBears <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @julyclyde \u6ce8\u610f\u8981\u914d\u7f6e escape=json,\u8d34\u4e00\u4e2a\u6211\u81ea\u7528\u7684\u914d\u7f6e:<\/p>\n<p> log_format main escape=json &#8216;{&#8220;timestamp&#8221;:&#8221;$time_iso8601&#8243;,&#8217;<br \/> &#8216;&#8221;server_addr&#8221;:&#8221;$server_addr&#8221;,&#8217;<br \/> &#8216;&#8221;server_port&#8221;:&#8221;$server_port&#8221;,&#8217;<br \/> &#8216;&#8221;host&#8221;:&#8221;$host&#8221;,&#8217;<br \/> &#8216;&#8221;hostname&#8221;:&#8221;$hostname&#8221;,&#8217;<br \/> &#8216;&#8221;client_addr&#8221;:&#8221;$remote_addr&#8221;,&#8217;<br \/> &#8216;&#8221;client_port&#8221;:&#8221;$remote_port&#8221;,&#8217;<br \/> &#8216;&#8221;server_name&#8221;:&#8221;$server_name&#8221;,&#8217;<br \/> &#8216;&#8221;request_uri&#8221;:&#8221;$request_uri&#8221;,&#8217;<br \/> &#8216;&#8221;uri&#8221;:&#8221;$uri&#8221;,&#8217;<br \/> &#8216;&#8221;https&#8221;:&#8221;$https&#8221;,&#8217;<br \/> &#8216;&#8221;x_forwarded_for&#8221;:&#8221;$http_x_forwarded_for&#8221;,&#8217;<br \/> &#8216;&#8221;scheme&#8221;:&#8221;$scheme&#8221;,&#8217;<br \/> &#8216;&#8221;request_method&#8221;:&#8221;$request_method&#8221;,&#8217;<br \/> &#8216;&#8221;args&#8221;:&#8221;$args&#8221;,&#8217;<br \/> &#8216;&#8221;referer&#8221;:&#8221;$http_referer&#8221;,&#8217;<br \/> &#8216;&#8221;http_user_agent&#8221;:&#8221;$http_user_agent&#8221;,&#8217;<br \/> &#8216;&#8221;request_length&#8221;:$request_length,&#8217;<br \/> &#8216;&#8221;content_length&#8221;:&#8221;$content_length&#8221;,&#8217;<br \/> &#8216;&#8221;content_type&#8221;:&#8221;$content_type&#8221;,&#8217;<br \/> &#8216;&#8221;body_bytes_sent&#8221;:$body_bytes_sent,&#8217;<br \/> &#8216;&#8221;bytes_sent&#8221;:$bytes_sent,&#8217;<br \/> &#8216;&#8221;request_time&#8221;:$request_time,&#8217;<br \/>  &#8216;&#8221;status&#8221;:$status,&#8217;<br \/> &#8216;&#8221;upstream_status&#8221;: &#8220;$upstream_status&#8221;,&#8217;<br \/> &#8216;&#8221;upstream_addr&#8221;:&#8221;$upstream_addr&#8221;,&#8217;<br \/> &#8216;&#8221;upstream_time&#8221;:&#8221;$upstream_response_time&#8221;,&#8217;<br \/> &#8216;&#8221;upstream_cache_status&#8221;:&#8221;$upstream_cache_status&#8221;&#8216;<br \/> &#8216;}&#8217;;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217024\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : PepperEgg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @q1angch0u \u4e0d\u597d\u610f\u601d\u6253\u5b57\u6709\u70b9\u5feb\u6ca1\u6ce8\u610f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217025\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : PepperEgg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @PolarBears \u53ef\u4ee5 \u7814\u7a76\u4e0b\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217026\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : learningman <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @PolarBears \u8fd9\u4e48\u73a9\u4e0d\u4f1a\u628a io \u5835\u6b7b\u5417\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5217027\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : julyclyde <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @learningman \u5176\u5b9e\u5e76\u6ca1\u6709\u591a\u51e0\u4e2a\u5b57\u7b26\u5427\uff1f\u4e00\u4e2a\u7a7a\u683c\u53d8\u6210\u4fe9\u5f15\u53f7\u4e00\u4e2a\u9017\u53f7\u800c\u5df2                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>win \u7aef Nginx \u5982\u4f55\u7edf\u8ba1\u6d41&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/326059"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=326059"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/326059\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=326059"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=326059"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=326059"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}