From 29a27d516f2d6db736034458f4566c43fcfcb3ed Mon Sep 17 00:00:00 2001 From: tanfarming Date: Mon, 28 Nov 2022 16:42:33 -0500 Subject: [PATCH] switable nginx accesslog for turkey --- scripts/docker/nginx.config | 1 + scripts/docker/run.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/scripts/docker/nginx.config b/scripts/docker/nginx.config index 4c3e89346f..ab38269388 100644 --- a/scripts/docker/nginx.config +++ b/scripts/docker/nginx.config @@ -2,6 +2,7 @@ server { listen 8080 ssl; ssl_certificate /ssl/cert; ssl_certificate_key /ssl/key; + access_log off; location / { root /www; autoindex off; diff --git a/scripts/docker/run.sh b/scripts/docker/run.sh index 794b658695..9212dbea8c 100644 --- a/scripts/docker/run.sh +++ b/scripts/docker/run.sh @@ -24,4 +24,7 @@ for f in /www/hubs/pages/*.html; do [[ $var == $prefix* ]] && sed -i "s/$anchor/ $anchor/" $f; done done + +if [ "${access_log}" = "enabled" ]; then sed -i "s/access_log off;//g" /etc/nginx/conf.d/default.conf; fi + nginx -g "daemon off;"