dbaplus Community
dbaplus Community
May 1, 2026 · Operations

Why a Simple Nginx Change Made All Gateway Requests Return 400 (And How to Fix It)

A production incident caused by replacing two Nginx reverse proxies introduced an upstream name with an underscore, resulting in invalid Host headers and 400 Bad Request responses from Spring Cloud Gateway; the article details the step‑by‑step investigation, evidence from logs, tcpdump, and code, and presents configuration fixes to restore normal operation.

HTTP 400Host headerNginx
0 likes · 15 min read
Why a Simple Nginx Change Made All Gateway Requests Return 400 (And How to Fix It)
Practical DevOps Architecture
Practical DevOps Architecture
Aug 12, 2025 · Backend Development

Mastering Nginx Proxy Header Transmission: Key Configurations and Common Pitfalls

This article explains how Nginx forwards HTTP request headers to backend servers, details the default headers passed, shows how to customize header transmission with directives like proxy_set_header, and addresses typical issues such as missing client IP, incorrect Host headers, and security concerns.

Load BalancingReverse Proxyhttp-headers
0 likes · 9 min read
Mastering Nginx Proxy Header Transmission: Key Configurations and Common Pitfalls
dbaplus Community
dbaplus Community
Mar 22, 2017 · Operations

Why Nginx Returns 400 Bad Request and How to Fix It

This article walks through a real‑world Nginx 400 Bad Request incident, explaining how missing or malformed Host headers and added proxy headers caused the error, and provides step‑by‑step diagnostics, configuration comparisons, and the final fix of using the correct $host variable.

400 Bad RequestHost headerNginx
0 likes · 13 min read
Why Nginx Returns 400 Bad Request and How to Fix It