Sometimes NGINX returns 405 on POST, when 504 GATEWAY TIMEOUT is expected

Murat Knecht murat.knecht at
Sat Jun 3 06:31:40 UTC 2017


yesterday I had a situation where NGINX *sometimes under some
configurations* returned a 405 METHOD NOT ALLOWED, when it was supposed
to return a 504 GATEWAY TIMEOUT.
Since troubleshooting this took a while, and information that I found
was fragmented, outdated, or inaccurate, I wrote a blog post about this.
Maybe it helps others, including my future self, to understand and fix
this behavior quicker:

On SO, a related question was asked:


More information about the nginx mailing list