Are there any recommended practices for configuring a server to monitor and ensure nginx is always running?
I have it set up with the init script from the Debian package, but every few days I will log in to find that nginx has stopped, and don't see any trace in the error logs of what caused it. I'm looking into ways to ensure that a process is running and restart it if it isn't, and I came across things such as supervisor and daemontools. But it seems that it's not recommended to run nginx as a foreground process, as these tools require. Is there another better way, or is the init script with nginx running as a daemon usually considered sufficient?
I appreciate any tips!