NGINX Questions and Answers

Is it possible to replace Nginx errors like 502 error with 503?

  • 502= Bad gateway
  • 503= Server overloaded

Yes, it is possible but you to ensure that fastcgi_intercept_errors is set to ON, and use the error page directive.

 

Location / {

fastcgi_pass 127.0.01:9001;

fastcgi_intercept_errors on;

error_page 502 =503/error_page.html;

#…

}