{"id":209685,"date":"2020-11-29T17:53:12","date_gmt":"2020-11-29T09:53:12","guid":{"rendered":"http:\/\/4563.org\/?p=209685"},"modified":"2020-11-29T17:53:12","modified_gmt":"2020-11-29T09:53:12","slug":"%e6%9c%89%e5%a4%a7%e4%bd%ac%e7%9f%a5%e9%81%93-nginx-%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%ae-cdn-%e5%98%9b%ef%bc%8c%e6%83%b3%e6%8a%98%e8%85%be%e4%b8%80%e4%b8%8b%e4%ba%86%e3%80%82%e3%80%82","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=209685","title":{"rendered":"\u6709\u5927\u4f6c\u77e5\u9053 nginx \u5982\u4f55\u914d\u7f6e cdn \u561b\uff0c\u60f3\u6298\u817e\u4e00\u4e0b\u4e86\u3002\u3002"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u6709\u5927\u4f6c\u77e5\u9053 nginx \u5982\u4f55\u914d\u7f6e cdn \u561b\uff0c\u60f3\u6298\u817e\u4e00\u4e0b\u4e86\u3002\u3002               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : EdifierDrew <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u7136\u800c google \u4e86\u597d\u4e45\uff0c\u4e5f\u914d\u7f6e\u4e86\u597d\u4e45\u4e5f\u6ca1\u4e2a\u6240\u4ee5\u7136\u3002\u3002\u3002<\/p>\n<p>\u6750\u6599\u662f\u4e8c\u8bdd\u4e0d\u8bf4\u53cc\u5341\u4e00\u76f4\u63a5\u5965\u91cc\u7ed9\u4e86\u7684\u3002\u3002\u3002\u3002\u3002<\/p>\n<p>\u6750\u6599\uff1a<br \/>\u4e00\u53f0\u539f\u7ad9 1h1g40G200M \u56fd\u5185\u901f\u5ea6\u5783\u573e\u7684\u4e00\u6279\u7684\u9e21\uff0c\u4e0a\u4f20\u4e0d\u8d85\u8fc7 100kb\/s\uff0c\u5e76\u4e14\u5df2\u7ecf\u642d\u597d https \u7f51\u7ad9\uff1b<br \/>\u5241\u597d\u624b\u7684 CN2 \u9e21\uff0cnginx \u5df2\u88c5\uff1b<br \/>\u4e00\u4e2a\u57df\u540d\uff1b<\/p>\n<p>\u7406\u60f3\u7ed3\u679c\uff1a\u8bbf\u95ee\u8fd9\u4e2a\u7f51\u7ad9\u57df\u540d\u8fde\u63a5\u5230\u7684\u662f cn2 \u9e21\uff0c\u5e76\u4e14\u663e\u793a\u539f\u7ad9\u5185\u5bb9\uff0c\u76f8\u5f53\u4e8e cn2 \u9e21\u662f cdn \u8fd9\u6837\u7684\uff1b<\/p>\n<p>\u4e0d\u7528\u519b\u54e5 lnmp \u7684\u914d\u7f6e\u5440\uff0c\u56e0\u4e3a\u786c\u76d8\u5c31 5G\uff0c\u64cd\u4f5c\u5c31\u662f\u539f\u7248 nginx<\/p>\n<p>\u671b\u6709\u5927\u4f6c\u770b\u5230\u5e76\u4e14\u70b9\u62e8\u4e00\u4e0b\u601d\u8def\u5457\u3002\u3002\u545c\u545c\u252d\u252e\ufe4f\u252d\u252e\u81ea\u5df1\u914d\u7f6e\u7684\u8981\u5d29\u6e83\u4e86      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4184011\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lostberryzz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6709\u4ec0\u4e48\u5730\u65b9\u4e0d\u6e05\u695a\u5462\uff0c\u4e0d\u662f\u6700\u57fa\u672c\u7684 nginx \u53cd\u4ee3\u4e48\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4184012\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mango88 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u57df\u540d\u7684 A \u8bb0\u5f55\u586b CN2 \u7684 ip \u5730\u5740<\/p>\n<p>CN2 \u7684 nginx proxy_pass \u5230 \u539f\u7ad9\u673a\u5668                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4184013\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wafm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8001\u54e5 \u4f60\u7684\u5934\u50cf                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4184014\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : program9527 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             proxy_pass \u53cd\u4ee3\u539f\u7ad9\uff0c<\/p>\n<p>\u628a https \u8bc1\u4e66\u79fb\u52a8\u5230\u8fd9\u53f0 cdn \u7684\u670d\u52a1\u5668\u4e0a\u3002\u3002<\/p>\n<p>\u4e3a\u4e86\u52a0\u5feb\u54cd\u5e94\u901f\u5ea6\uff0c\u51cf\u5c11\u56de\u6e90\u3002\u4f7f\u7528 proxy_cache \u7f13\u5b58\u539f\u7ad9\u7684 jpg png css js \u7b49\u9759\u6001\u5185\u5bb9\u3002<\/p>\n<p>\u5177\u4f53\u53ef\u4ee5\u641c\u7d22\u4e0b\u8fd9\u4e24\u4e2a\u914d\u7f6e\u9879                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4184015\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 37Y37 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5176\u5b9e\u6bcf\u592a\u770b\u660e\u767d\uff0c\u901a\u8fc7\u8bc4\u8bba\u5927\u6982\u4e86\u89e3\u4f60\u60f3\u8981\u7684\uff0c\u5c31\u662f\u901a\u8fc7\u8fd9\u4e2a\u8282\u70b9\u52a0\u901f\u539f\u59cb\u7f51\u7ad9\uff1f<\/p>\n<p>\u5982\u679c\u662f\u7684\u8bdd\u53ef\u4ee5\u53c2\u8003\u4e0b\uff0c\u6211\u7684\u7f51\u7ad9\u6258\u7ba1\u5728 github pages\uff0c\u901a\u8fc7\u9999\u6e2f\u4e3b\u673a\u4ee3\u7406\u52a0\u901f\uff0c\u914d\u7f6e\u662f\u8fd9\u6837\u7684\uff1a https:\/\/blog.ops-coffee.cn\/t\/nginx-upstream-github-pages                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4184016\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : black11black <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @program9527 <br \/>\u5e26\u4f6c\uff0cCDN \u4e0d\u56de\u6e90\u7684\u8bdd\u662f\u7528\u4ec0\u4e48\u7b56\u7565\u786e\u4fdd\u5206\u53d1\u5185\u5bb9\u6700\u65b0\u7684\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4184017\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : program9527 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @black11black \u4e0d\u56de\u6e90\u7684\u8bdd\u8d44\u6e90\u4ece\u54ea\u6765\u5462\uff1f\u9700\u8981\u76f4\u63a5\u628a\u6587\u4ef6\u90e8\u7f72\u5728\u8fd9\u53f0\u8bbe\u5907\u4e0a\u5427\u3002\u4e0d\u8fc7\u53ef\u4ee5\u901a\u8fc7\u811a\u672c\u7b80\u5316\u8fd9\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<p>\u4f7f\u7528 git-hook \u94a9\u5b50\uff0c\u6bcf\u6b21\u535a\u5ba2 push \u65b0\u7684\u5185\u5bb9\u7684\u65f6\u5019\u3002\u8fd9\u53f0\u642d\u5efa\u535a\u5ba2\u7684\u673a\u5668\u4e0a\uff0c\u4f7f\u7528 hook \u94a9\u5b50\uff0c\u81ea\u52a8 pull <\/p>\n<p>\u6709\u70b9\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8981\u7528 nginx location \u7981\u7528\u6389 .git \u76ee\u5f55\u7684\u8bbf\u95ee\u3002\u5426\u5219\u522b\u4eba\u53ef\u4ee5 http:\/\/xxxxx\/.git\/gitconfig \u8bbf\u95ee\u5230\u4f60\u7684 git \u76ee\u5f55\u3002(\u4e4b\u524d\u5403\u8fc7\u8fd9\u4e2a\u4e8f\u3002\u3002\u3002)                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4184018\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : program9527 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5982\u679c\u6587\u4ef6\u4e0d\u662f\u7528 git \u6258\u7ba1\u7684\u65b9\u5f0f\u3002\u3002\u3002\u90a3\u5c31\u7528\u811a\u672c\uff0cscp \u547d\u4ee4\uff0c\u628a\u6587\u4ef6\u4ece\u4e00\u53f0\u673a\u5668\u8fdc\u7a0b\u590d\u5236\u5230\u53e6\u4e00\u53f0\u673a\u5668\u4f7f\u7528\u6587\u4ef6\u81ea\u52a8\u540c\u6b65\u5427\u3002\u81f3\u4e8e\u5982\u4f55\u89e6\u53d1\u811a\u672c\u81ea\u52a8\u590d\u5236\u3002\u53c8\u662f\u53e6\u4e00\u4e2a\u8bdd\u9898\u4e86\u3002\u3002\u3002<\/p>\n<p>git \u6258\u7ba1\u662f\u4ee5\u524d\u6211\u7528\u6765\u540c\u6b65\u6587\u4ef6\u7684\u65b9\u5f0f\u3002\u73b0\u5728\u6362\u6210\u4e86 scp \u540c\u6b65\u4e86\u3002\u3002\u3002<\/p>\n<p>\u56e0\u4e3a git \u4ed3\u5e93\u591a\u673a\u5668\u81ea\u52a8\u540c\u6b65\u6587\u4ef6\u7684\u65b9\u5f0f\u4f1a\u5bfc\u81f4\u4ed3\u5e93\u8d8a\u6765\u8d8a\u5927\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u5927\u4f6c\u77e5\u9053 nginx \u5982\u4f55\u914d\u7f6e &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\/209685"}],"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=209685"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/209685\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209685"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}