Nginx proxy_intercept_errors
Maxim Dounin
mdounin at mdounin.ru
Wed Mar 6 13:54:06 UTC 2013
Hello!
On Wed, Mar 06, 2013 at 03:44:37PM +0200, Kiril Kalchev wrote:
> I have noticed that when I set 'proxy_intercept_errors on;' in
> my nginx config it kills tcp connection to the origin server if
> it returns 4xx or 5xx?
> This is my example config to reproduce the
> situation(https://gist.github.com/kirilkalchev/5098882). I am
> in a situation where my backend server returns only 403 and 404
> (it is some kind of home made authentication system 403 means go
> away 404 means continue) and I need to display different things
> in this cases, but without keep alive connections to the backend
> are exhausted pretty fast.
With proxy_intercept_errors nginx doesn't read the response body
if a response returned is the error, and the upstream connection
can't be kept alive due to this (unless there is no body and it's
known after reading response headers).
--
Maxim Dounin
http://nginx.org/en/donation.html
More information about the nginx
mailing list