From 3458a841060029f2867c9505e19dc0a626a36f0a Mon Sep 17 00:00:00 2001 From: Gaspard Jacobson <52928254+gjacobjn@users.noreply.github.com> Date: Wed, 16 Aug 2023 17:35:46 +0100 Subject: [PATCH 1/3] Update entrypoint.sh --- docker/nginx/root/entrypoint.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/nginx/root/entrypoint.sh b/docker/nginx/root/entrypoint.sh index 313744a81b..2593e416fe 100755 --- a/docker/nginx/root/entrypoint.sh +++ b/docker/nginx/root/entrypoint.sh @@ -13,13 +13,14 @@ else fi if [ ! -z "$GATEWAY_FASTCGI_HTTPS" ]; then - echo "GATEWAY_FASTCGI_HTTPS is defined : $GATEWAY_FASTCGI_HTTPS" - GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS $GATEWAY_FASTCGI_HTTPS;" + GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS $GATEWAY_FASTCGI_HTTPS;" + if [ $GATEWAY_FASTCGI_HTTPS == "on" || $GATEWAY_FASTCGI_HTTPS == "1" ]; then + GATEWAY_FASTCGI_HTTPS=";fastcgi_param SERVER_PORT 443;" + fi else echo "NO GATEWAY_FASTCGI_HTTPS is defined" GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS on;fastcgi_param SERVER_PORT 443;" - fi cat /nginx.conf.sample | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" | sed "s/\$GATEWAY_SEND_TIMEOUT/$GATEWAY_SEND_TIMEOUT/g" | sed "s/\$GATEWAY_FASTCGI_TIMEOUT/$GATEWAY_FASTCGI_TIMEOUT/g" | sed "s/\$MAX_BODY_SIZE/$MAX_BODY_SIZE/g" | sed "s/\$GATEWAY_PROXY_TIMEOUT/$GATEWAY_PROXY_TIMEOUT/g" | sed "s/\$NEW_TARGET/$NEW_TARGET/g" | sed "s/\$NEW_RESOLVER/$NEW_RESOLVER/g" | sed "s/\$GATEWAY_FASTCGI_HTTPS/$GATEWAY_FASTCGI_HTTPS/g" > /etc/nginx/conf.d/default.conf From 1b39ba7bd5f99f50e5c38627f7bc3084bd3a1d55 Mon Sep 17 00:00:00 2001 From: Gaspard Jacobson <52928254+gjacobjn@users.noreply.github.com> Date: Thu, 24 Aug 2023 12:34:20 +0200 Subject: [PATCH 2/3] Update entrypoint.sh --- docker/nginx/root/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx/root/entrypoint.sh b/docker/nginx/root/entrypoint.sh index 2593e416fe..c8727a976d 100755 --- a/docker/nginx/root/entrypoint.sh +++ b/docker/nginx/root/entrypoint.sh @@ -16,7 +16,7 @@ if [ ! -z "$GATEWAY_FASTCGI_HTTPS" ]; then echo "GATEWAY_FASTCGI_HTTPS is defined : $GATEWAY_FASTCGI_HTTPS" GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS $GATEWAY_FASTCGI_HTTPS;" if [ $GATEWAY_FASTCGI_HTTPS == "on" || $GATEWAY_FASTCGI_HTTPS == "1" ]; then - GATEWAY_FASTCGI_HTTPS=";fastcgi_param SERVER_PORT 443;" + GATEWAY_FASTCGI_HTTPS=`echo $GATEWAY_FASTCGI_HTTPS` ";fastcgi_param SERVER_PORT 443;" fi else echo "NO GATEWAY_FASTCGI_HTTPS is defined" From e5a35c316935acfe116be5eb174f585f4261bba7 Mon Sep 17 00:00:00 2001 From: moctardiouf Date: Thu, 7 Sep 2023 12:18:23 +0200 Subject: [PATCH 3/3] enhance GATEWAY_FASTCGI_HTTPS management script --- docker/nginx/root/entrypoint.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/nginx/root/entrypoint.sh b/docker/nginx/root/entrypoint.sh index c8727a976d..d38a2548ea 100755 --- a/docker/nginx/root/entrypoint.sh +++ b/docker/nginx/root/entrypoint.sh @@ -14,9 +14,11 @@ fi if [ ! -z "$GATEWAY_FASTCGI_HTTPS" ]; then echo "GATEWAY_FASTCGI_HTTPS is defined : $GATEWAY_FASTCGI_HTTPS" - GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS $GATEWAY_FASTCGI_HTTPS;" - if [ $GATEWAY_FASTCGI_HTTPS == "on" || $GATEWAY_FASTCGI_HTTPS == "1" ]; then - GATEWAY_FASTCGI_HTTPS=`echo $GATEWAY_FASTCGI_HTTPS` ";fastcgi_param SERVER_PORT 443;" + if [ "$GATEWAY_FASTCGI_HTTPS" = "on" ] || [ "$GATEWAY_FASTCGI_HTTPS" = "1" ];then + echo "SETTING SERVER_PORT TO: 443" + GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS on;fastcgi_param SERVER_PORT 443;" + else + GATEWAY_FASTCGI_HTTPS="fastcgi_param HTTPS $GATEWAY_FASTCGI_HTTPS;" fi else echo "NO GATEWAY_FASTCGI_HTTPS is defined"