I have my site which is using nginx, and testing site with header testing tools e.g. http://www.webconfs.com/http-header-check.php but every time it says 400 bad request bel
I had the same issue and tried everything. This 400
happened for an upstream proxy.
Debug logged showed absolutely nothing.
The problem was in duplicate proxy_set_header Host $http_host
directive, which I didn't notice initially.
Removing duplicate one solved the issue immediately.
I wish nginx
was saying something other than 400
in this scenario, as nginx -t
didn't complain at all.
P.S. this happened while migrating from older nginx 1.10
to the newer 1.19
. Before it was tolerated apparently.