I have set up nginx with the current latest version following
https://docs.peer5.com/guides/setting-up-hls-live-streaming-server-using-nginx/

I have connected successfully to the server and VCL was receiving a stream.

I left it for one week. When I returned I found I could not longer receive hls streams, or any streams.

I have tried many different pathways of installation but the most successful is still the one I followed above. Every new installation attempt falls at the hls stream pusshing from the server.

Output from nginx root folder:

total 12812
drwxr-xr-x 2 nobody   www-data    4096 Jun 16 16:04 .
drwxr-xr-x 3 www-data www-data    4096 Jun 16 15:58 ..
-rw-r--r-- 1 nobody   nogroup   837916 Jun 16 16:02 test-0.ts
-rw-r--r-- 1 nobody   nogroup   835848 Jun 16 16:02 test-1.ts
-rw-r--r-- 1 nobody   nogroup  1007116 Jun 16 16:04 test-10.ts
-rw-r--r-- 1 nobody   nogroup  1012380 Jun 16 16:04 test-11.ts
-rw-r--r-- 1 nobody   nogroup  1004860 Jun 16 16:04 test-12.ts
-rw-r--r-- 1 nobody   nogroup  1013508 Jun 16 16:04 test-13.ts
-rw-r--r-- 1 nobody   nogroup   242896 Jun 16 16:04 test-14.ts
-rw-r--r-- 1 nobody   nogroup   850512 Jun 16 16:03 test-2.ts
-rw-r--r-- 1 nobody   nogroup   826636 Jun 16 16:03 test-3.ts
-rw-r--r-- 1 nobody   nogroup   849948 Jun 16 16:03 test-4.ts
-rw-r--r-- 1 nobody   nogroup   830208 Jun 16 16:03 test-5.ts
-rw-r--r-- 1 nobody   nogroup   837540 Jun 16 16:03 test-6.ts
-rw-r--r-- 1 nobody   nogroup   902588 Jun 16 16:03 test-7.ts
-rw-r--r-- 1 nobody   nogroup  1011440 Jun 16 16:03 test-8.ts
-rw-r--r-- 1 nobody   nogroup  1012756 Jun 16 16:04 test-9.ts
-rw-r--r-- 1 nobody   nogroup      448 Jun 16 16:04 test.m3u8

So there is a stream being produced.

JW Player supplies error code 232011 - Cannot load M3U8: Crossdomain access denied

nginx conf:

worker_processes  auto;
events {
    worker_connections  1024;
}

# RTMP configuration
rtmp {
    server {
        listen 1935; # Listen on standard RTMP port
        chunk_size 4000;

        application show {
            live on;
            # Turn on HLS
            hls on;
            hls_path /nginx/hls/;
            hls_fragment 3;
            hls_playlist_length 60;
            # disable consuming the stream from nginx as rtmp
            deny play all;
        }
    }
}

http {
    sendfile off;
    tcp_nopush on;
    # aio on;
    directio 512;
    default_type application/octet-stream;

    server {
        listen 8080;

        location / {
            # Disable cache
            add_header 'Cache-Control' 'no-cache';

            # CORS setup
            add_header 'Access-Control-Allow-Origin' '*' always;
            add_header 'Access-Control-Expose-Headers' 'Content-Length';

            # allow CORS preflight requests
            if ($request_method = 'OPTIONS') {
                add_header 'Access-Control-Allow-Origin' '*';
                add_header 'Access-Control-Max-Age' 1728000;
                add_header 'Content-Type' 'text/plain charset=UTF-8';
                add_header 'Content-Length' 0;
                return 204;
            }

            types {
                application/dash+xml mpd;
                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }

            root /nginx/;
        }
    }
}

Can anyone assist in identifying the error please?

edited by MattIPv4
Submit an answer

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!