{"id":221101,"date":"2020-11-24T00:15:18","date_gmt":"2020-11-23T16:15:18","guid":{"rendered":"http:\/\/4563.org\/?p=221101"},"modified":"2020-11-24T00:15:18","modified_gmt":"2020-11-23T16:15:18","slug":"%e5%9c%a8-docker-%e4%b8%ad%e5%ae%89%e8%a3%85-nginx%ef%bc%8c-nginx-conf-%e6%8c%82%e8%bd%bd%e5%a4%b1%e8%b4%a5%ef%bc%8c%e5%af%bc%e8%87%b4%e6%97%a0%e8%ae%ba%e6%80%8e%e4%b9%88%e4%bf%ae%e6%94%b9%e5%ae%bf","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=221101","title":{"rendered":"\u5728 docker \u4e2d\u5b89\u88c5 Nginx\uff0c nginx.conf \u6302\u8f7d\u5931\u8d25\uff0c\u5bfc\u81f4\u65e0\u8bba\u600e\u4e48\u4fee\u6539\u5bbf\u4e3b\u673a\u6302\u8f7d\u76ee\u5f55\u7684 nginx.conf,\u5b83\u7684\u6b22\u8fce\u9875\u59cb\u7ec8\u5c79\u7acb\u4e0d\u5012"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5728 docker \u4e2d\u5b89\u88c5 Nginx\uff0c nginx.conf \u6302\u8f7d\u5931\u8d25\uff0c\u5bfc\u81f4\u65e0\u8bba\u600e\u4e48\u4fee\u6539\u5bbf\u4e3b\u673a\u6302\u8f7d\u76ee\u5f55\u7684 nginx.conf,\u5b83\u7684\u6b22\u8fce\u9875\u59cb\u7ec8\u5c79\u7acb\u4e0d\u5012               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : WILLSHEN <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u662f\u7684\uff0c\u6211\u5feb\u75af\u4e86<\/p>\n<p>docker run -d <br \/> &#8211;name nginx <br \/> &#8211;restart=always <br \/> -p 4000:80 <br \/> -v \/share\/Container\/nginx\/html:\/usr\/share\/nginx\/html <br \/> -v \/share\/Container\/nginx\/log:\/var\/log\/nginx <br \/> -v \/share\/Container\/nginx\/conf.d:\/etc\/nginx\/conf.d <br \/> -v \/share\/Container\/nginx\/nginx.conf:\/etc\/nginxnginx.conf:ro <br \/> nginx<\/p>\n<p>\u5f53\u7136\u5148\u8dd1\u4e86\u4e00\u4e2a\u5b98\u65b9\u6ca1\u6709\u6302\u8f7d\u7684\u955c\u50cf\uff0c\u7136\u540e\u628a\u5185\u5bb9\u590d\u5236\u5230\u5bbf\u4e3b\u673a\uff0c\u7136\u540e docker run \u4e00\u4e0b\uff0c\u6ca1\u6709\u62a5\u9519\u53ef\u4ee5\u8dd1\u8d77\u6765 \u6211\u4fee\u6539\u5bbf\u4e3b\u673a\u6302\u8f7d html \u4e2d\u7684\u6b22\u8fce\u754c\u9762\u4e5f\u662f\u53ef\u4ee5\u6709\u5bf9\u5e94\u7684\u6539\u53d8 \u4f46\u662f\u5f53\u6211\u4fee\u6539 nginix.conf \u5bbf\u4e3b\u673a\u7684\u95ee\u4ef6\u65f6\uff0c\u54ea\u6015\u6211\u628a\u4ed6\u5220\u4e86\uff0c\u91cd\u8f7d\u914d\u7f6e\u6587\u4ef6\u540e\u6b22\u8fce\u9875\u4f9d\u65e7\u575a\u633a<\/p>\n<p>\u8bd5\u8fc7\u4e24\u8fb9\u90fd\u662f\u76ee\u5f55\uff0c\u4e24\u8fb9\u90fd\u662f\u6587\u4ef6\u7684\u5404\u79cd\u6302\u8f7d\u65b9\u6cd5\uff0c\u90fd\u4e0d\u884c\uff1f<\/p>\n<p>\u8c01\u80fd\u6551\u6551\u6211\uff0c\u6211\u5feb\u75af\u4e86<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4455425\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : stille <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53bb\u6389 ro \u8bd5\u8bd5<\/p>\n<p>\u548c\u6211\u4e4b\u524d\u601d\u8def\u4e00\u6837\uff0c\u6211\u4e22 GitHub \u4e0a\u4e86\uff0c\u6bcf\u6b21\u9700\u8981\u7528\u5c31 clone \u4e00\u6761\u547d\u4ee4\u5c31 OK \u4e86<\/p>\n<p>https:\/\/github.com\/stilleshan\/nginx                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4455426\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : WILLSHEN <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @stille \u8fd9\u662f\u4e2a\u65b0\u53d1\u73b0\uff0c\u6211\u7a0d\u540e\u8bd5\u8bd5\u5e26~\u7684\uff0c\u53e6\u5916\u6211\u6709\u6ca1\u6709 RO \u90fd\u4e0d\u884c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4455427\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : WILLSHEN <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @stille \u4e0d\u884c\u554a\uff0c\u65e0\u8bba\u662f\u5426\u6709~\uff0c\u662f\u5426\u6709 RO \u90fd\u4e0d\u884c\u554a\uff0c\u5b83\u8fd8\u662f\u90a3\u4e48\u7684\u987d\u56fa\u3002\u3002\u3002\u6211\u3002\u3002\u3002\u592a\u96be\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4455428\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : stille <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @WILLSHEN \u4f60\u5148\u5b8c\u5168\u7528\u6211\u8fd9\u4e2a\u8bd5\u8bd5\u770b&#8230;github \u4e0a\u6709\u5177\u4f53\u6d41\u7a0b\u8bf4\u660e..\u5176\u5b9e\u548c\u4f60\u601d\u8def\u4e00\u81f4\u7684..\u6210\u529f\u4e86\u5728\u6392\u67e5\u4f60\u7684\u95ee\u9898.<br \/>\u53e6\u5916\u4f60\u6700\u540e nginxnginx.conf:ro \u7684\u659c\u6760\u662f\u6253\u9519\u4e86\u8fd8\u662f\u600e\u4e48..                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4455429\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : maxbon <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4ee5\u524d\u7684\u505a\u6cd5\u662f\u76f4\u63a5\u91cd\u7f16\u4e86\u4e00\u4e2a\u955c\u50cf                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4455430\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : WILLSHEN <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @maxbon \u95ee\u9898\u89e3\u51b3\u4e86\uff0c\u539f\u56e0\u662f<\/p>\n<p>\/etc\/nginxnginx.conf:ro <\/p>\n<p>\u5e94\u8be5\u662f<\/p>\n<p>\/etc\/nginx\/nginx.conf<br \/>@stille                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4455431\" 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>                                                             ro \u4e3a\u4ec0\u4e48\u4e0d\u884c\uff1f\u96be\u9053 nginx \u8fd8\u4f1a\u53bb\u6539\u914d\u7f6e\u6587\u4ef6\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 docker \u4e2d\u5b89\u88c5 Ngin&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\/221101"}],"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=221101"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/221101\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=221101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=221101"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=221101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}