how to make nginx loadbalancer give 404 when all upstream servers are down

Francis Daly francis at daoine.org
Thu Aug 13 11:12:38 UTC 2015


On Thu, Aug 13, 2015 at 05:12:57AM -0400, karkunpavan wrote:

Hi there,

> starnge thing is when both IP1, IP2 are down the nginx server itself takes
> it up and responds to the http requests from ab. Is there a way to make
> nginx not behave this way?

That does seem strange to me.

What output do you get from a request like

  curl -i http://your-nginx:8000/

when one "upstream" is active; and when no "upstream" is active?

What does your nginx access_log say for those two requests?

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list