Welcome! Log In Create A New Profile

Advanced

Recommended way to ensure nginx is always running?

Posted by jrosen 
Recommended way to ensure nginx is always running?
October 15, 2012 01:27PM
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!
Re: Recommended way to ensure nginx is always running?
October 16, 2012 03:18AM
I'm using 'monit' for this purpose: http://mmonit.com/wiki/Monit/ConfigurationExamples
Re: Recommended way to ensure nginx is always running?
October 16, 2012 04:05AM
I hope these tutorials will help you: "Optimizing Nginx configuration".

http://rtcamp.com/tutorials/optimizing-nginx-configuration/
http://rtcamp.com/wordpress-nginx/tutorials/
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 111
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready