title: Is it possible to change the HTTP status code returned when proxy_pass gateway is down in nginx?
body: <p>For SEO purposes, we would like to change the HTTP status code returned whenever the backend machine behind nginx goes down for some reason.</p>
  
  <p>We would like to change this to "503 Service Unavailable". As well as provide a Retry-After header to indicated to Google / Bing that the request should be retried in X number of seconds.</p>
  
  <p>Is this possible via nginx?</p>
  
  <p>I am not talking about a custom error page, but rather the status code returned in the header.</p>