{"id":1047,"date":"2014-08-27T17:47:54","date_gmt":"2014-08-27T09:47:54","guid":{"rendered":"https:\/\/cowman-chiang.no-ip.org\/wordpress\/?p=1047"},"modified":"2023-10-31T15:46:01","modified_gmt":"2023-10-31T07:46:01","slug":"nginx-%e5%ad%98%e5%8f%96%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/cowmanchiang.me\/wp\/?p=1047","title":{"rendered":"Nginx \u5b58\u53d6\u8a2d\u5b9a"},"content":{"rendered":"<p>\u6a94\u6848 \/usr\/local\/nginx\/conf\/nginx.conf<\/p>\n<pre lang=\"bash\">#\u5728 http \u6a21\u7d44\u4e0b\n        location \/ {\n            root   html;\n            index  index.html index.htm;\n            # allowed ip list\n            allow 192.168.0.0\/24;\n            #deny ip list\n            deny all;\n        }\n\n        location \/obs-remote {\n            root  html;\n            index index.html index.htm;\n            # allowed ip list\n            allow 192.168.0.0\/24;\n            #deny ip list\n            deny  all;\n        }\n\n#\u5728 rtmp \u6a21\u7d44\u4e0b\n        application live {\n            live on;\n            record off;\n            # allow publish streaming\n            allow publish 192.168.0.0\/24;\n            # deny publish streaming\n            deny publish all;\n            # allow play\n            allow play 192.168.0.0\/24;\n            # deny play\n            deny play all;\n<\/pre>\n<p>\u4fee\u6539\u5f8c\uff0c\u57f7\u884c <code> service nginx reload <\/code> \u91cd load \u8a2d\u5b9a\u6a94<br \/>\n\u9019\u908a\u90fd\u662f\u8a2d\u5b9a 192.168.0.0\/24 \u7684 Lan \u5167\u624d\u80fd\u89c0\u770b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6a94\u6848 \/usr\/local\/nginx\/conf\/nginx.conf #\u5728 http \u6a21\u7d44\u4e0b location \/ { root html; index index.html index.htm; # allowed ip list allow 192.168.0.0\/24; #deny ip list deny all; } location \/obs-remote { root html; index index.html index.htm; # allowed ip list allow 192.168.0.0\/24; #deny &hellip; <a href=\"https:\/\/cowmanchiang.me\/wp\/?p=1047\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[],"class_list":["post-1047","post","type-post","status-publish","format-standard","hentry","category-nginx"],"_links":{"self":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1047"}],"version-history":[{"count":1,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1047\/revisions"}],"predecessor-version":[{"id":2019,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=\/wp\/v2\/posts\/1047\/revisions\/2019"}],"wp:attachment":[{"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cowmanchiang.me\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}