[email protected] +91-120-6025102
Submit

Avail Best discounts

Please fill in the form below and we will contact you within 24 hours.

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

Yes, switching of errors in Nginx is possible. An error like 502 which means bad gateway, can be replaced with error 503 (server overloaded) by following below methods:

By setting up fastcgi_intercept_errors to ON, you can accomplish the required task.
Use the error-page directive:

Location / {
fastcgi_pass 127.0.01:9001;
fastcgi_intercept_errors on;
error_page 502 =503/error_page.html;
#_ _ _
}

Was this answer helpful? #0 #0
 

Submit Query

Please fill in the form below and we will contact you within 24 hours.