404 fallback only hitting 2/3 upstream sets

Maxim Dounin mdounin at mdounin.ru
Wed Aug 8 10:31:07 UTC 2012


On Tue, Aug 07, 2012 at 01:15:45PM -0400, helliax wrote:

> I think i got it. I had to add the following directive under the server
> { } heading:
> recursive_error_pages	on;
> I'm checking the access logs, and I'm seeing the third one now (ipA :
> ipB : ipC), and it's also returning the file correctly. I hope this is
> the right way.

It is, more or less.  You should be careful though, as 
recursive_error_pages set to on might easily result in infinite 
loop (nginx will break it eventually, but nevertheless).  I would 
recommend limiting recursive_error_pages scope to minimum 

In your case, it should be enough to set recursive_error_pages to 
on in "location /".

Maxim Dounin

More information about the nginx mailing list