From fa570f981d9f6e153228d83288c08eb3d08a083a Mon Sep 17 00:00:00 2001 From: "dave@tiredofit.ca" Date: Tue, 23 Jan 2024 08:49:13 -0800 Subject: [PATCH] Release 6.4.8 - See CHANGELOG.md --- CHANGELOG.md | 6 ++++++ README.md | 3 ++- install/assets/defaults/10-nginx | 1 + install/assets/functions/10-nginx | 1 + install/etc/cont-init.d/10-nginx | 7 ++++++- install/etc/nginx/nginx.conf | 2 ++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bca8a7a..3d46ac4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 6.4.8 2024-01-23 + + ### Added + - Add NGINX_SERVER_NAMES_HASH_BUCKET_SIZE environment variable + + ## 6.4.7 2023-12-08 ### Added diff --git a/README.md b/README.md index 4195d8d..3eaf62a 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ The following image tags are available along with their tagged release based on | latest | `:latest` | latest | `:debian` | | latest | `:alpine` | Bookworm | `:debian-bookworm ` | | edge | `:alpine-edge` | Bullseye | `:debian-bullseye` | -| 3.19 | `:alpine-3.18` | Buster | `:debian-buster` | +| 3.19 | `:alpine-3.19` | Buster | `:debian-buster` | | 3.18 | `:alpine-3.18` | | | | 3.16 | `:alpine-3.16` | | | | 3.15 | `:alpine-3.15` | | | @@ -329,6 +329,7 @@ You can also enter into the container and type `maintenance ARG`, where ARG is e | `NGINX_UPSTREAM_KEEPALIVE` | Keepalive connections to utilize for upstream | `32` | | `NGINX_FASTCGI_BUFFERS` | Amount of FastCGI Buffers | `16 16k` | | `NGINX_FASTCGI_BUFFER_SIZE` | FastCGI Buffer Size | `32k` | +| `NGINX_SERVER_NAMES_HASH_BUCKET_SIZE` | Server names hash size (`256`` if `NGINX_ENABLE_BLOCK_BOTS=TRUE`) | `32` | ### Networking diff --git a/install/assets/defaults/10-nginx b/install/assets/defaults/10-nginx index f98ff29..387ad03 100755 --- a/install/assets/defaults/10-nginx +++ b/install/assets/defaults/10-nginx @@ -81,6 +81,7 @@ NGINX_PROXY_BUSY_BUFFERS_SIZE=${NGINX_PROXY_BUSY_BUFFERS_SIZE:-"256k"} NGINX_REAL_IP_HEADER=${NGINX_REAL_IP_HEADER:-"X-Forwarded-For"} NGINX_RELOAD_ON_CONFIG_CHANGE=${NGINX_RELOAD_ON_CONFIG_CHANGE:-"FALSE"} NGINX_SEND_TIMEOUT=${NGINX_SEND_TIMEOUT:-60} +NGINX_SERVER_NAMES_HASH_BUCKET_SIZE=${NGINX_SERVER_NAMES_HASH_BUCKET_SIZE:-"32"} NGINX_SET_REAL_IP_FROM=${NGINX_SET_REAL_IP_FROM:-"172.16.0.0/12"} NGINX_UPLOAD_MAX_SIZE=${NGINX_UPLOAD_MAX_SIZE:-"2G"} NGINX_UPSTREAM_KEEPALIVE=${NGINX_UPSTREAM_KEEPALIVE:-"32"} diff --git a/install/assets/functions/10-nginx b/install/assets/functions/10-nginx index 3253faa..11f005a 100755 --- a/install/assets/functions/10-nginx +++ b/install/assets/functions/10-nginx @@ -380,6 +380,7 @@ nginx_configure_server() { NGINX_KEEPALIVE_REQUESTS \ NGINX_KEEPALIVE_TIMEOUT \ NGINX_SEND_TIMEOUT \ + NGINX_SERVER_NAMES_HASH_BUCKET_SIZE \ NGINX_PROXY_BUFFERS \ NGINX_PROXY_BUFFER_SIZE \ NGINX_PROXY_BUSY_BUFFERS_SIZE \ diff --git a/install/etc/cont-init.d/10-nginx b/install/etc/cont-init.d/10-nginx index 74b6c63..2559d4b 100755 --- a/install/etc/cont-init.d/10-nginx +++ b/install/etc/cont-init.d/10-nginx @@ -22,7 +22,12 @@ if [ ! -f "/tmp/.container/container-restart" ] ; then nginx_configure_mode nginx_configure_server nginx_configure_authentication - if var_true "${NGINX_ENABLE_BLOCK_BOTS}" ; then nginx_configure_blockbots ; else sed -i "\|include /etc/nginx/snippets/bot_blocker.conf;|d" /etc/nginx/nginx.conf ; fi + if var_true "${NGINX_ENABLE_BLOCK_BOTS}" ; then + sed -i "/server_names_hash_bucket_size/d" /etc/nginx/nginx.conf + nginx_configure_blockbots + else + sed -i "\|include /etc/nginx/snippets/bot_blocker.conf;|d" /etc/nginx/nginx.conf + fi nginx_configure_logging nginx_configure_maintenance diff --git a/install/etc/nginx/nginx.conf b/install/etc/nginx/nginx.conf index b147c46..33c5c4f 100644 --- a/install/etc/nginx/nginx.conf +++ b/install/etc/nginx/nginx.conf @@ -37,6 +37,8 @@ http { proxy_buffers {{NGINX_PROXY_BUFFERS}}; proxy_busy_buffers_size {{NGINX_PROXY_BUSY_BUFFERS_SIZE}}; + server_names_hash_bucket_size {{NGINX_SERVER_NAMES_HASH_BUCKET_SIZE}}; + server_tokens off; more_clear_headers Server;