From 29a8e1162cfa79a3c3ff64db800dc7d80ba3254d Mon Sep 17 00:00:00 2001 From: Ethan McAuliffe <14607273+emcauliffe@users.noreply.github.com> Date: Mon, 25 May 2026 21:29:34 +0900 Subject: [PATCH 1/4] Add root_blocks configuration to nginx_proxy --- nginx_proxy/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/nginx_proxy/config.yaml b/nginx_proxy/config.yaml index 25bc4c190..54a7e050d 100644 --- a/nginx_proxy/config.yaml +++ b/nginx_proxy/config.yaml @@ -24,6 +24,7 @@ options: active: false default: nginx_proxy_default*.conf servers: nginx_proxy/*.conf + root_blocks: nginx_root_blocks*.conf real_ip_from: [] ports: 443/tcp: 443 From b38cd876520092bc1687e8c4800933bf89c8f283 Mon Sep 17 00:00:00 2001 From: emcauliffe <14607273+emcauliffe@users.noreply.github.com> Date: Mon, 25 May 2026 20:41:02 +0800 Subject: [PATCH 2/4] add customization at the root level of the generated nginx file --- nginx_proxy/DOCS.md | 6 +++++- nginx_proxy/config.yaml | 2 +- nginx_proxy/rootfs/etc/nginx/nginx.conf.gtpl | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nginx_proxy/DOCS.md b/nginx_proxy/DOCS.md index 12e20603b..3e062c337 100644 --- a/nginx_proxy/DOCS.md +++ b/nginx_proxy/DOCS.md @@ -64,7 +64,7 @@ Value for the [`Strict-Transport-Security`][hsts] HTTP header to send. If empty, ### Option `customize.active` (required) -If true, additional NGINX configuration files for the default server and additional servers are read from files in the `/share` directory specified by the `default` and `servers` variables. +If true, additional NGINX configuration files for the default server and additional servers are read from files in the `/share` directory specified by the `default`, `servers`, and `root_blocks` variables. ### Option `customize.default` (required) @@ -74,6 +74,10 @@ The filename of the NGINX configuration for the default server, found in the `/s The filename(s) of the NGINX configuration for the additional servers, found in the `/share` directory. +### Option `customize.root_conf` (required) + +The filename of the NGINX configuration for additional parameters to place in the root level of the configuration file, found in the `/share` directory. + ### Option `cloudflare` (optional) If enabled, configure Nginx with a list of IP addresses directly from Cloudflare that will be used for `set_real_ip_from` directive Nginx config. diff --git a/nginx_proxy/config.yaml b/nginx_proxy/config.yaml index 54a7e050d..371175da7 100644 --- a/nginx_proxy/config.yaml +++ b/nginx_proxy/config.yaml @@ -24,7 +24,7 @@ options: active: false default: nginx_proxy_default*.conf servers: nginx_proxy/*.conf - root_blocks: nginx_root_blocks*.conf + root_conf: nginx_root_conf*.conf real_ip_from: [] ports: 443/tcp: 443 diff --git a/nginx_proxy/rootfs/etc/nginx/nginx.conf.gtpl b/nginx_proxy/rootfs/etc/nginx/nginx.conf.gtpl index 57dbe0ba7..371ff343a 100644 --- a/nginx_proxy/rootfs/etc/nginx/nginx.conf.gtpl +++ b/nginx_proxy/rootfs/etc/nginx/nginx.conf.gtpl @@ -10,6 +10,10 @@ events { worker_connections 1024; } +{{- if .options.customize.active }} +include /share/{{ .options.customize.root_conf }}; +{{- end }} + http { map_hash_bucket_size 128; From 61508f7d5d7e1cbfa530e2532dc58eb185825777 Mon Sep 17 00:00:00 2001 From: emcauliffe <14607273+emcauliffe@users.noreply.github.com> Date: Mon, 25 May 2026 20:53:32 +0800 Subject: [PATCH 3/4] resolve doc term mismatch --- nginx_proxy/DOCS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx_proxy/DOCS.md b/nginx_proxy/DOCS.md index 3e062c337..5c4c5dd88 100644 --- a/nginx_proxy/DOCS.md +++ b/nginx_proxy/DOCS.md @@ -64,7 +64,7 @@ Value for the [`Strict-Transport-Security`][hsts] HTTP header to send. If empty, ### Option `customize.active` (required) -If true, additional NGINX configuration files for the default server and additional servers are read from files in the `/share` directory specified by the `default`, `servers`, and `root_blocks` variables. +If true, additional NGINX configuration files for the default server and additional servers are read from files in the `/share` directory specified by the `default`, `servers`, and `root_conf` variables. ### Option `customize.default` (required) From ee58d76198edafe87bbd96d8ffbb2802289f7c4e Mon Sep 17 00:00:00 2001 From: emcauliffe <14607273+emcauliffe@users.noreply.github.com> Date: Mon, 25 May 2026 20:58:33 +0800 Subject: [PATCH 4/4] update schema with root_conf --- nginx_proxy/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/nginx_proxy/config.yaml b/nginx_proxy/config.yaml index 371175da7..1dceb8e59 100644 --- a/nginx_proxy/config.yaml +++ b/nginx_proxy/config.yaml @@ -41,5 +41,6 @@ schema: active: bool default: str servers: str + root_conf: str real_ip_from: - str