From 5ea5544b504803902db40a6d237adb16da7d4f3c Mon Sep 17 00:00:00 2001 From: Andrew Rowson Date: Sun, 30 May 2021 09:39:27 +0100 Subject: [PATCH] Listen on both ipv4 and ipv6 in nginx For environments that are dual-stack, the current config will only listen on ipv4. Adding an extra listen directive should allow connections to be served on both ipv4 & ipv6. I couldn't figure out how to do this with a single `listen` directive. In theory, a single `[::]:5000 ipv6only=off` should work, but trying that on my local enviroment, ipv4 clients were unable to connect. A mystery. --- docker/rootfs/usr/local/nginx/conf/nginx.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/rootfs/usr/local/nginx/conf/nginx.conf b/docker/rootfs/usr/local/nginx/conf/nginx.conf index 7e372d722..14cb7e0c8 100644 --- a/docker/rootfs/usr/local/nginx/conf/nginx.conf +++ b/docker/rootfs/usr/local/nginx/conf/nginx.conf @@ -45,6 +45,7 @@ http { server { listen 5000; + listen [::]:5000; # vod settings vod_base_url ''; @@ -196,7 +197,7 @@ http { rtmp { server { - listen 1935; + listen [::]:1935; chunk_size 4096; allow publish 127.0.0.1; deny publish all;