开发者

How to replace nginx errors

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜