{"id":151633,"date":"2020-08-25T19:53:12","date_gmt":"2020-08-25T11:53:12","guid":{"rendered":"http:\/\/4563.org\/?p=151633"},"modified":"2020-08-25T19:53:12","modified_gmt":"2020-08-25T11:53:12","slug":"%e5%85%b3%e4%ba%8e-nginx-%e8%bd%ac%e5%8f%91%e9%97%ae%e9%a2%98%e8%af%b7%e6%b1%82","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=151633","title":{"rendered":"\u5173\u4e8e nginx \u8f6c\u53d1\u95ee\u9898\u8bf7\u6c42"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5173\u4e8e nginx \u8f6c\u53d1\u95ee\u9898\u8bf7\u6c42               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xiaojianbang <\/span>  <span><i><\/i> 17<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u5927\u4f6c\u4eec\uff0c\u4eca\u5929\u78b0\u5230\u4e00\u4e2a\u95ee\u9898\uff0c\u6211\u53f8\u6709\u4e00\u5957\u7cfb\u7edf\u5b58\u5728\u4e24\u4e2a\u7aef\u3002\u7531\u4e8e\u91c7\u7528\u4e86\u7b2c\u4e09\u65b9\u63d2\u4ef6\u9700\u8981\u4ed8\u8d39\u8d2d\u4e70\uff0c\u5728\u57df\u540d\u91c7\u8d2d\u5907\u6848\u5b8c\u6210\u540e\u8ddf\u7b2c\u4e09\u65b9\u63d2\u4ef6\u516c\u53f8\u6c9f\u901a\uff0c\u4ed6\u4eec\u53ea\u8ba4\u5b9a\u4e00\u4e2a\u57df\u540d\u4e00\u5957\u7cfb\u7edf\uff0c\u6211\u53f8\u7cfb\u7edf\u5b58\u5728\u4e24\u4e2a\u7aef\uff0c\u6bd4\u5982\u4e3a http:\/\/xxx.example.com \u3001http:\/\/yyy.example.com \u4e24\u4e2a\u4e8c\u7ea7\u57df\u540d\uff0c\u6309\u7167\u4e09\u65b9\u8bf4\u6cd5\u6211\u4eec\u9700\u8981\u91c7\u7528\u4e24\u5957\uff0c\u9886\u5bfc\u8003\u8651\u5230\u4ef7\u683c\u8f83\u8d35\u53ea\u60f3\u4e70\u4e00\u5957\uff0c\u6709\u6ca1\u6cd5\u529e\u6cd5\u901a\u8fc7 nginx \u8def\u5f84\u8f6c\u53d1\u89e3\u51b3\u5462\uff1f\u6bd4\u5982\uff1a http:\/\/xxx.example.com\/user http:\/\/xxx.example.com\/admin \u4e24\u5957\u7cfb\u7edf\u7684\u8bbf\u95ee\uff0c\u5e0c\u671b\u5927\u4f6c\u4eec\u7ed9\u89e3\u89e3\u60d1      <\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3031388\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Te11UA <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &#8220;`<br \/>server {<br \/> listen 80;<br \/> server_name example.com;<br \/> location \/user\/ {<br \/> proxy_pass http:\/\/backend1\/;<br \/> proxy_redirect off;<br \/> proxy_set_header Host $host;<br \/> proxy_set_header X-Real-IP $remote_addr;<br \/> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/> }<br \/> #\u5176\u4ed6\u8def\u5f84\u9ed8\u8ba4\u8bbf\u95ee\u524d\u53f0\u7f51\u7ad9<br \/> location \/admin\/ {<br \/> proxy_pass http:\/\/backend2;<br \/> proxy_redirect off;<br \/> proxy_set_header Host $host;<br \/> proxy_set_header X-Real-IP $remote_addr;<br \/> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br \/> }<br \/>}<br \/>&#8220;`                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3031389\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : xiaojianbang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Te11UA \u611f\u8c22\u611f\u8c22\uff0c\u6211\u8fd9\u5c31\u53bb\u8bd5\u8bd5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3031390\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lower <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1 \u6b63\u89e3\uff0c\u4f46\u662f\u5047\u5982\u7cfb\u7edf\u4e2d\u6709\u6d89\u53ca\u5230 \u7528\u57df\u540d\u8c03\u7528 \/\u8bf7\u6c42 \/\u56de\u8c03\u7684\u63a5\u53e3\u5730\u5740\uff0c\u90fd\u5f97\u76f8\u5e94\u5904\u7406                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5173\u4e8e nginx \u8f6c\u53d1\u95ee\u9898\u8bf7\u6c42 \u8cc7&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\/151633"}],"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=151633"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/151633\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=151633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=151633"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=151633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}