diff --git a/nginx-rtmp/Dockerfile b/nginx-rtmp/Dockerfile index f2e3f88..39bc75d 100644 --- a/nginx-rtmp/Dockerfile +++ b/nginx-rtmp/Dockerfile @@ -6,7 +6,7 @@ RUN apk add --no-cache nginx nginx-mod-rtmp; \ ln -sf /dev/stderr /var/log/nginx/error.log COPY docker-entrypoint.sh / -COPY rtmp.conf /etc/nginx/modules/ +COPY nginx.conf /etc/nginx/ WORKDIR /var/www/live diff --git a/nginx-rtmp/nginx.conf b/nginx-rtmp/nginx.conf new file mode 100644 index 0000000..13f39ce --- /dev/null +++ b/nginx-rtmp/nginx.conf @@ -0,0 +1,39 @@ +user nginx; +worker_processes auto; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + +include /etc/nginx/modules/*.conf; + +events { + worker_connections 1024; +} + +rtmp { + server { + listen 1935; + chunk_size 4000; + + include /etc/nginx/streams.d/*.conf; + } +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + server_tokens off; + + keepalive_timeout 65; + + sendfile on; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + include /etc/nginx/conf.d/*.conf; +} diff --git a/nginx-rtmp/rtmp.conf b/nginx-rtmp/rtmp.conf deleted file mode 100644 index 89a836a..0000000 --- a/nginx-rtmp/rtmp.conf +++ /dev/null @@ -1,10 +0,0 @@ -load_module "modules/ngx_rtmp_module.so"; - -rtmp { - server { - listen 1935; - chunk_size 4000; - - include /etc/nginx/streams.d/*.conf; - } -}