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

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


Hey,

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:

http://muratknecht.de/tech/why-nginx-returns-405-post-504-gateway-timeout-gotchas-error-page/

On SO, a related question was asked:
https://stackoverflow.com/questions/42167669/nginx-405-not-allowed-fastcgi-timeout/44330457#44330457

Cheers,
murat




More information about the nginx mailing list