I'm looking for a way to serve up a static message from nginx if an upstreams
section returns certain HTTP codes. I understand that I could use static pages and ask NGINX to serve these up, but this is slightly more complicated that I need - all really need is (in pseudocode) to say
if($code_from_proxy_upstream == 500){
return 500 'Error Occured'
}
I Read this question and this question, but I don't think that they quite do what I need. I think that I need some combination of the two, but not quite sure of the syntax.