Monitor and restart Apache or lighttpd webserver when daemon is killed

Posted on in Categories Apache, CentOS, Debian Linux, FreeBSD, GNU/Open source, Howto, lighttpd, Linux, Monitoring, MySQL, Networking, Postfix, RedHat/Fedora Linux, Security, Shell scripting, Suse Linux, Sys admin, UNIX last updated January 1, 2009

When you cannot monitor your server for service availability, it is better to take help of automated monitor and restart utility. Last 4 days I was away from my server as I was enjoying my vacation. During this time due to load my lighttpd webserver died but it was restarted automatically within 2 minutes. I had utility configured for monitoring services on a Linux system called monit. It offers all features you ever needed for system monitoring and perform error recovery for UNIX like system.