From 1d6ab7275f4f159f4a6760758d0bf40eef073bef Mon Sep 17 00:00:00 2001 From: bunkerity Date: Sat, 27 Jun 2020 19:09:38 +0200 Subject: [PATCH] http basic auth fix --- README.md | 8 ++++++-- confs/auth-basic.conf | 4 ++-- confs/serve-files.conf | 4 +--- entrypoint.sh | 8 ++++---- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index d71d5966c..b81fa6d45 100644 --- a/README.md +++ b/README.md @@ -370,9 +370,13 @@ ENV WRITE_ACCESS yes ``` # TODO -- Auth basic testing +- nginx compile flags +- x86 and ARM versions +- README improve +- docker tags +- Tutorials +- Full documentation - Antibot with recaptcha v3 -- Documentation - Custom TLS certificates - HSTS preload, HPKP - Web UI diff --git a/confs/auth-basic.conf b/confs/auth-basic.conf index 1e504790c..9bf459587 100644 --- a/confs/auth-basic.conf +++ b/confs/auth-basic.conf @@ -1,4 +1,4 @@ location %AUTH_BASIC_LOCATION% { - auth_basic "%AUTH_BASIC_TEXT%"; - auth_basic_user_file /etc/nginx/.htpasswd; + auth_basic "%AUTH_BASIC_TEXT%"; + auth_basic_user_file /etc/nginx/.htpasswd; } diff --git a/confs/serve-files.conf b/confs/serve-files.conf index fe621a35a..01d723a10 100644 --- a/confs/serve-files.conf +++ b/confs/serve-files.conf @@ -1,5 +1,3 @@ root /www; index index.html index.php; -location / { - try_files $uri $uri/ =404; -} +try_files $uri $uri/ =404; diff --git a/entrypoint.sh b/entrypoint.sh index f99a393bb..0b5a7e741 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -95,10 +95,10 @@ USE_CLAMAV_UPLOAD="${USE_CLAMAV_UPLOAD-yes}" USE_CLAMAV_SCAN="${USE_CLAMAV_SCAN-yes}" CLAMAV_SCAN_REMOVE="${CLAMAV_SCAN_REMOVE-yes}" USE_AUTH_BASIC="${USE_AUTH_BASIC-no}" -AUTH_BASIC_TEXT="{AUTH_BASIC_TEXT-Restricted area}" -AUTH_BASIC_LOCATION="{AUTH_BASIC_LOCATION-/}" -AUTH_BASIC_USER="{AUTH_BASIC_USER-changeme}" -AUTH_BASIC_PASSWORD="{AUTH_BASIC_PASSWORD-changeme}" +AUTH_BASIC_TEXT="${AUTH_BASIC_TEXT-Restricted area}" +AUTH_BASIC_LOCATION="${AUTH_BASIC_LOCATION-/}" +AUTH_BASIC_USER="${AUTH_BASIC_USER-changeme}" +AUTH_BASIC_PASSWORD="${AUTH_BASIC_PASSWORD-changeme}" # install additional modules if needed if [ "$ADDITIONAL_MODULES" != "" ] ; then