[BUG] 1.6.15: duplicate "underscores_in_headers" directive on scheduler config push after upgrade, multi-location reverse-proxy service (Linux native)
Affected area
Scheduler
What happened?
What happened?
After upgrading from 1.6.14 to 1.6.15 (Linux package, native install, MariaDB backend), the scheduler's
periodic config push (POST /reload?test=yes on the internal API) fails for one specific reverse-proxy
service with multiple REVERSE_PROXY_HOST_* locations:
nginx: [emerg] "underscores_in_headers" directive is duplicate in /etc/nginx//server-http/reverse-proxy.conf:13
The generated reverse-proxy.conf file itself only contains one occurrence of
underscores_in_headers off; when inspected on disk (cat -n), yet nginx reports it as a duplicate
at that exact line/file — suggesting the directive is emitted twice during template rendering for
this server context, even though the file that lands on disk after a successful cold-start generation
only shows it once.
nginx keeps running on the last known-good (fallback) config, so there is no downtime — but every scheduled config push (roughly every 30-45s) fails and re-triggers the "configuration fell back to the last working one" banner in the Web UI.
How to reproduce?
- Native Linux install (Debian/Ubuntu apt package), MariaDB as database backend.
- One service (
netbird.example.comin our case) configured with 6 separateREVERSE_PROXY_HOST_0throughREVERSE_PROXY_HOST_4andREVERSE_PROXY_HOST_999entries (i.e. 6 differentlocationblocks proxying to different paths on the same backend), set up via the Web UI. - Upgrade the
bunkerwebpackage from 1.6.14 to 1.6.15 (apt install bunkerweb=1.6.15), restartbunkerweb,bunkerweb-scheduler,bunkerweb-ui. - Cold start (
start.sh) generates a valid config once and nginx starts fine (nginx -tsucceeds immediately after boot). - Within a couple of minutes, the scheduler's periodic
/reload?test=yescall starts failing with the duplicate-directive error above, repeating indefinitely.
Configuration file(s)
Relevant excerpt of the generated /etc/nginx/<service>/server-http/reverse-proxy.conf (only ONE
underscores_in_headers line present when read from disk):
proxy_ssl_server_name off;
proxy_ssl_verify off;
proxy_intercept_errors off;
underscores_in_headers off;
location "/relay" { ... }
location "/ws-proxy/" { ... }
location "/api/" { ... }
location "/oauth2/" { ... }
location "/dashboard/" { ... }
location "/" { ... }Include chain (confirmed only included once): /etc/nginx/http.conf:106:include /etc/nginx//server.conf; /etc/nginx//server.conf:24:include /etc/nginx//server-http/*.conf;
No custom configs are set for this service under /etc/bunkerweb/configs/server-http/ (confirmed empty
of any underscores_in_headers reference). Database inspection (bw_services_settings) shows no
duplicate rows for REVERSE_PROXY_HOST_* beyond the expected one row per suffix (0,1,2,3,4,999).
Relevant log output
2026/09/26 21:52:15 [emerg] 1376#1376: "underscores_in_headers" directive is duplicate in /etc/nginx/netbird.example.com/server-http/reverse-proxy.conf:13 2026/09/26 21:52:18 [warn] 1190#1190: *551 [API] call from 127.0.0.1 on /reload failed : config check failed: nginx: [emerg] "underscores_in_headers" directive is duplicate in /etc/nginx/netbird.example.com/server-http/reverse-proxy.conf:13 nginx: configuration file /etc/nginx/nginx.conf test failed , client: 127.0.0.1, server: bwapi, request: "POST /reload?test=yes HTTP/1.1", host: "bwapi"
BunkerWeb version
1.6.15
What integration are you using?
Linux (native package, Debian/Ubuntu apt, not Docker)
Linux distribution (if applicable)
Debian/Ubuntu (apt-based)
Additional context
- The service in question is the only one with 6 separate
REVERSE_PROXY_HOST_*locations; other (single-location) services on the same instance did not show this issue. nginx -Ton the currently-loaded (fallback) config showsunderscores_in_headersexactly once per service (18 services = 18 occurrences), which is expected — the duplicate only appears when the scheduler attempts to push a new render of this specific multi-location service's config.
How to reproduce?
- Native Linux install (Debian/Ubuntu apt package), MariaDB as database backend.
- One service (netbird.example.com in our case) configured with 6 separate REVERSE_PROXY_HOST_0 through REVERSE_PROXY_HOST_4 and REVERSE_PROXY_HOST_999 entries (i.e. 6 different location blocks proxying to different paths on the same backend), set up via the Web UI.
- Upgrade the bunkerweb package from 1.6.14 to 1.6.15 (apt install bunkerweb=1.6.15), restart bunkerweb, bunkerweb-scheduler, bunkerweb-ui.
- Cold start (start.sh) generates a valid config once and nginx starts fine (nginx -t succeeds immediately after boot).
- Within a couple of minutes, the scheduler's periodic /reload?test=yes call starts failing with the duplicate-directive error above, repeating indefinitely.
Configuration file(s) (yaml or .env)
Relevant log output
BunkerWeb version
1.6.15
What integration are you using?
Docker
Linux distribution (if applicable)
No response
Duplicate search
- I searched open and closed issues and did not find an existing report
Removed private data
- I have removed all private data from the configuration file and the logs
Code of Conduct
- I agree to follow this project's Code of Conduct
Source: bunkerity/bunkerweb