开发者

How to replace nginx errors

开发者 https://www.devze.com 2023-03-05 01:37 出处:网络
Is it possible to replace 502 errors on nginx.conf (php-fpm problems), with 503? 502 = bad gateway 503 = server overloaded

Is it possible to replace 502 errors on nginx.conf (php-fpm problems), with 503?

502 = bad gateway

503 = server overloaded


nginx: 502

googlebot: Hmmm, I don't like that... sorry but... penalized...


nginx: 503

googlebot: Hmmm, no problem, I will try again later...

nginx: thank you for yo开发者_Go百科ur willingness to understand



Make sure fastcgi_intercept_errors is set to on, and use the error_page directive:

location / {
    fastcgi_pass 127.0.0.1:9001;
    fastcgi_intercept_errors on;
    error_page 502 =503 /error_page.html;
    # ...
}
0

精彩评论

暂无评论...
验证码 换一张
取 消