Welcome! Log In Create A New Profile

Advanced

Handling 404 errors

May 24, 2018 12:10PM
I need some thoughts on this problem.

I am load balancing upstream servers, two are IIS servers on VMs and one is an Azure App Service (PaaS) web app. During deployment the apps are shut down and reloaded. The problem is that the Azure web app returns a 403 when it is shut down, so Nginx serves stale content. But the IIS servers return a 404 error. Since we don’t serve stale content to a 404 (nor would we want to) it means that we need to come up with a solution to work around this.

The only thing I can tell is that when the IIS site is turned off there is a response header of Connection: close. But if I start the site up and force a 404 error, I get this header which does not appear when the site is turned off: X-Powered-By: ASP.NET.

My question is if there is a way to manipulate the values in the proxy_cache_use_stale to include http_404 but only under special circumstances. Or if there is some other way to include some logic that would allow me at the server block level to force serving stale content.

I appreciate any thoughts/ideas how to overcome this. I’ve tried to find out if I can force IIS to serve a 403 error and have not had much luck and in all honesty, I am trying not to customize IIS and would rather focus customization on Nginx configuration files.

Thanks,
-mike




___________________________________________
Michael Friscia
Office of Communications
Yale School of Medicine
(203) 737-7932 - office
(203) 931-5381 - mobile
http://web.yale.eduhttp://web.yale.edu/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Handling 404 errors

wickedhangover May 24, 2018 12:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready