From 66907f236ac852630e10ab676ed9da66511c4f6f Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Mon, 22 Apr 2019 13:23:36 +0000 Subject: [PATCH] add option for nginx to listen on socket --- entrypoint.sh | 3 +++ nginx.conf | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index d95a75e..986fa1b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,7 @@ #!/bin/ash +if ! [ -z $NGINX_LISTEN_SOCKET ]; then + sed -i 's#listen 80#listen unix:/var/run/nginx.sock#' /etc/nginx/conf.d/default.conf +fi nginx touch /data/torrents diff --git a/nginx.conf b/nginx.conf index d2e49a2..45f514d 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,6 +1,6 @@ server { - listen 80; - server_name localhost; + listen 80; + server_name localhost; root /srv/www/webui/;