I need help with 403 forbidden

Tom Strike tom at sleepyvalley.net
Sat Apr 27 20:22:09 UTC 2019


I have just set up nginx on my server to stream video to and retrieve it 
in an http web page. I have tried everything that I can think of and all 
the recommendations i could find by Googling but nothing gives me http 
access th the video stream that is active on the server. I keep adding 
things I run into to my nginx.conf file and now it is so bloated it's 
ridiculous. The thing that concerns me with this issue is that I am 
using Apache2 on this same server running php7 at the standard port 80. 
I moved Nginx to port 8088. I've tried running Nginx as "user apache" 
thinking that might help with a possibility that php is running under 
the apache ownership but that didn't help. The following is my config file:

#user  nginx;
user apache;
worker_processes  auto;
events {
     worker_connections  1024;
}
# We need to setup an rmtp server to stream video from client devices
rtmp {
     server {
         listen 1935;
         chunk_size 4096;
         ping 30s;
         notify_method get;
         allow play all;
         # rmtp handler our clients connect to for live streaming, it 
runs on port 1935.
         # It converts the stream to HLS and stores it on our server
         application pb1ag {
             live on;
             hls on;
             hls_path /var/www/nginx/pb1ag/live;
             hls_nested on;  # create a new folder for each stream
             record_notify off;
             record_path /var/www/nginx/pb1ag/videos;
             record off;
             record_unique off;
         }

         application vod {
            play /var/www/nginx/pb1ag/videos;
         }
     }
}

http {
     include       mime.types;
     default_type  application/octet-stream;
     log_format  main  '$remote_addr - $remote_user [$time_local] 
"$request" '
                       '$status $body_bytes_sent "$http_referer" '
                       '"$http_user_agent" "$http_x_forwarded_for"';
     sendfile        on;
     tcp_nopush     on;
     keepalive_timeout  65;
     gzip  on;
     server_tokens off;
     server {
         listen 8088;
         server_name  www.pb1ag.us;
         root /var/www/nginx/pb1ag;
         index  index.m3u8;
         location / {
             root   html;
             index  index.m3u8 index.html index.htm;
             autoindex on;
             autoindex_exact_size off;
         }
         # the http end point our web based users connect to see the 
live stream
         location /live {
             types {
                 application/vnd.apple.mpegurl m3u8;
             }
             index  index.m3u8;
             alias /var/www/nginx/pb1ag/live;
             add_header Cache-Control no-cache;
#           add_header 'Access-Control-Allow-Origin' '*';
         }
     }
}

I am working against a deadline and this ius the last problem to solve 
and I am getting desperate. Please help, anyone?

Thanks.



More information about the nginx mailing list