{"id":3696,"date":"2019-01-08T16:59:26","date_gmt":"2019-01-08T08:59:26","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=3696"},"modified":"2019-01-08T16:59:26","modified_gmt":"2019-01-08T08:59:26","slug":"nginx-%e7%9a%84%e7%83%ad%e9%85%8d%e7%bd%ae%ef%bc%8c%e9%85%8d%e7%bd%ae%e7%ab%8b%e5%8d%b3%e7%94%9f%e6%95%88%e5%91%bd%e4%bb%a4-nginx-s-reload-%e8%af%a6%e8%a7%a3","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=3696","title":{"rendered":"nginx \u7684\u70ed\u914d\u7f6e\uff0c\u914d\u7f6e\u7acb\u5373\u751f\u6548\u547d\u4ee4 nginx -s reload \u8be6\u89e3"},"content":{"rendered":"<p>\n\tnginx \u5728\u5927\u4e2d\u578b\u4e92\u8054\u7f51\u516c\u53f8\u4e2d\u66fe\u5728\u8fd9\u666e\u904d\u4f7f\u7528\u7684\u73b0\u8c61\u3002\u5728\u4e2d\u56fd\u5f00\u53d1\u5f80\u5f80\u9700\u8981\u505a\u4e00\u4e9b\u8fd0\u7ef4\u7684\u5de5\u4f5c\uff0c\u5982\u679c\u4f60\u5bf9\u4e00\u4e9b\u547d\u4ee4\u4e0d\u61c2\u6216\u8005\u7a0d\u4e0d\u5c0f\u5fc3\uff0c\u5b89\u5168\u4e8b\u6545\u5c31\u4f1a\u6210\u5b89\u5168\u6545\u4e8b\uff01\n<\/p>\n<p>\n\t\u8ddf\u6211\u4e00\u8d77\u5b66 nginx\uff0c\u8ba9\u4f4e\u85aa\u6c34\u6210\u4e3a\u8fc7\u53bb\u5f0f\u5427\uff01\n<\/p>\n<p>\n\t\u5728 nginx \u4e2d\uff0c\u5982\u679c\u6211\u4fee\u6539\u4e86\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u6216\u8005\u65b0\u589e\u4e86\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\u3002\u6309\u7167\u7fa4\u91cc\u7f51\u53cb\u7684\u63cf\u8ff0\uff0c\u6211\u9700\u8981\u5173\u95ed nginx\uff0c\u6216\u8005\u91cd\u542f nginx\uff0c\u6bd4\u8f83\u9ebb\u70e6\uff0c\u800c\u4e14\u8fd9\u4e2a\u8fc7\u7a0b\u4e2d\u4f1a\u4e2d\u65ad\u670d\u52a1\u7684\u63d0\u4f9b\u3002\u90a3\u4e48\u6709\u6ca1\u6709\u70ed\u914d\u7f6e\uff0c\u6216\u8005\u662f\u4e0d\u91cd\u542f\u5c31\u53ef\u4ee5\u751f\u6548\u5462\uff1f\n<\/p>\n<p>\n\t\u7b54\u6848\u5f53\u7136\u662f\u6709\u7684\u3002\u90a3\u5c31\u662f\u4f7f\u7528 nginx -s reload \u547d\u4ee4\u3002\n<\/p>\n<p>\n\t-s \u4ee3\u8868\u7684\u662f\u5411\u4e3b\u8fdb\u7a0b\u53d1\u9001\u4fe1\u53f7\u3002\u5176\u4e2d\u4fe1\u53f7\u6709 4 \u4e2a\uff0cstop, quit, reopen, reload\u3002\n<\/p>\n<p>\n\treload \u5c31\u662f\u91cd\u65b0\u52a0\u8f7d\u7684\u610f\u601d\u3002nginx -s reload \u547d\u4ee4\uff0c\u5408\u8d77\u6765\u7684\u4f5c\u7528\u5c31\u662f\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\u3002\n<\/p>\n<p>\n\t\u4e0b\u9762\u4e00\u8d77\u770b\u4e00\u4e2a\u4f8b\u5b50\uff1a\n<\/p>\n<pre class=\"brush:bash;\">\r\nvi nginx.conf\r\n# \u5c06 tcp_nopush on; \u524d\u9762\u7684\u6ce8\u91ca\u53bb\u6389\uff0c\u653e\u5f00\u6ce8\u91ca\r\n# \u7136\u540e\u4fdd\u5b58\u7f16\u8f91\r\nnginx -s reload<\/pre>\n<p>\n\t\u8fd9\u6837\u5c31\u53ef\u4ee5\u505a\u5230\u4e0d\u505c\u670d\u52a1\uff0c\u5e73\u6ed1\u7684\u66f4\u65b0 nginx \u7684\u914d\u7f6e\u6587\u4ef6\u3002\u8fd9\u6837\u505a\u7684\u597d\u5904\u5c31\u662f\u5ba2\u6237\u4f53\u9a8c\u597d\uff0c\u6bd4\u5982\u6211\u6b63\u5728\u6570\u636e\u4f20\u8f93\uff0c\u5982\u679c\u4f60\u8fd9\u65f6\u91cd\u542f nginx\uff0c\u53ef\u80fd\u5c31\u4f1a\u9020\u6210\u6570\u636e\u4e22\u5931\u3002\u8fd9\u4e2a\u65f6\u5019\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u6e29\u67d4\u7684\u91c7\u7528 nginx -s reload \u547d\u4ee4\u52a0\u8f7d\u914d\u7f6e\u6587\u4ef6\u3002\n<\/p>\n<p>\n\t\u5728\u6bd4\u5982\uff0c\u6211\u4eec\u7684\u8d1f\u8f7d\u5747\u8861\uff0c\u7070\u5ea6\u53d1\u5e03\uff0c\u70ed\u90e8\u7f72\u3002\u90fd\u53ef\u4ee5\u91c7\u7528\u4fee\u6539\u914d\u7f6e\u7684\u8fd9\u79cd\u65b9\u5f0f\u8fdb\u884c\u3002\n<\/p>\n<p>\n\t\u5047\u8bbe\u6211\u73b0\u5728\u6709\u4e24\u53f0\u673a\u5668\uff0cA \u548c B\u3002\u90a3\u4e48\u6211\u4eec\u5c31\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539\u914d\u7f6e\uff0cproxy_pass http:\/\/A; \u6216 proxy_pass &nbsp;http:\/\/B; \u505a\u5230\u70ed\u90e8\u7f72\u3002\u901a\u8fc7\u66f4\u6539\u914d\u7f6e\u6587\u4ef6\uff0c\u5207\u6362\u8bf7\u6c42\u6d41\u91cf\uff0c\u5b8c\u6210\u670d\u52a1\u53d1\u5e03\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=3696\">nginx \u7684\u70ed\u914d\u7f6e\uff0c\u914d\u7f6e\u7acb\u5373\u751f\u6548\u547d\u4ee4 nginx -s reload \u8be6\u89e3<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>nginx \u5728\u5927\u4e2d\u578b\u4e92\u8054\u7f51\u516c\u53f8\u4e2d\u66fe\u5728\u8fd9\u666e\u904d\u4f7f\u7528\u7684\u73b0\u8c61\u3002\u5728\u4e2d\u56fd\u5f00\u53d1\u5f80\u5f80\u9700\u8981\u505a\u4e00\u4e9b\u8fd0\u7ef4\u7684\u5de5\u4f5c\uff0c\u5982\u679c\u4f60\u5bf9\u4e00\u4e9b\u547d\u4ee4\u4e0d\u61c2 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,6],"tags":[646,1152,1340,904,1194],"class_list":["post-3696","post","type-post","status-publish","format-standard","hentry","category-sql","category-yyzt","tag-gitbook","tag-nginx","tag-1340","tag-904","tag-1194"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3696","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3696"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3696\/revisions"}],"predecessor-version":[{"id":3697,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/3696\/revisions\/3697"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}