custom 502 error for stacked proxies

2019-05-02 Thread Paul B. Henson
So, I've got a need for a reverse proxy where first it tries server A; if it gets a 404 from server A it should try server B, and then just return whatever happens with server B. I've got this config so far: location /_nginx_/ { internal; root /var/www/localhost/nginx; } location

Re: custom 502 error for stacked proxies

2019-05-03 Thread Paul B. Henson
On Fri, May 03, 2019 at 01:47:40PM +0300, Sergey Kandaurov wrote: > you may want to try recursive error pages in location / {} > with error_page 502 in @server_b. Sweet, that did indeed do the trick. Thank you very much for the suggestion. ___ nginx ma