If ngnix hangs up, how can a startup script such as 502 can automatically start nginx be implemented

  question

If ngnix hangs up, how can php implement a startup script such as 502, which can automatically start nginx?

Nginx 502 happened to be because Nginx did not hang up and the back-end application hung up.

One of the reasons for Nginx’s rapid development is that it is not so easy to hang up. The hanging up of back-end applications will also give front-end customers an error prompt instead of a simple connection failure.