apache - About Nginx handling 502 errors
某草草
某草草 2017-05-16 16:58:41
0
1
543

Hi
I encountered a problem, that is, I used Nginx in the front and apache in the back.

But sometimes when apache restarts (assuming the restart is not smooth), nginx will immediately return 502.

How to make nginx connect to the backend (such as apache), if the backend is in an unresponsive state, or is not started, Nginx will retry N times and return 502?

Instead of returning 502 immediately, thank you!

某草草
某草草

reply all(1)
伊谢尔伦

nginx reverse proxy cannot find apache and will definitely report a 502 error. The service is unavailable at this time. Even if the error is reported after retrying n times, the service will hang during the retry process, but the 502 error will not be displayed.
I think what you want is not to display a 502 error even if nginx makes an error. So, is it okay to directly block the 502 error?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!