Nginx - Rate limit when origin server response code is 401

veerareddy nginx-forum at
Thu Apr 26 17:10:10 UTC 2018

Hello Viet,

I posted the same question on Digital Ocean forums and got a response
suggesting to intercept errors from upstream and to rate limit based on the
error using the `error_page` directive. I haven't tried it myself yet but
it's worth a shot. Here's a link to the full post:
Let me know if this works for you.

Krishna Veera Reddy

Posted at Nginx Forum:,279547,279595#msg-279595

More information about the nginx mailing list