Nginx 存取設定

檔案 /usr/local/nginx/conf/nginx.conf

#在 http 模組下
        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 ip list
            deny  all;
        }

#在 rtmp 模組下
        application live {
            live on;
            record off;
            # allow publish streaming
            allow publish 192.168.0.0/24;
            # deny publish streaming
            deny publish all;
            # allow play
            allow play 192.168.0.0/24;
            # deny play
            deny play all;

修改後,執行 service nginx reload 重 load 設定檔
這邊都是設定 192.168.0.0/24 的 Lan 內才能觀看

This entry was posted in Nginx. Bookmark the permalink.