How to monitor & automatically restart MySQL, Nginx, Apache etc. on your server
Thank to: https://superdevresources.com/ Managing server is not an easy job, specially if you have multiple softwares like MySQL, Nginx or Apache running on your servers. Downtime happens and running softwares get killed due to many reasons. In this post, I will share how I use Monit to constantly monitor programs running on my servers and automatically get them restarted when they go down. Monit also enables me to remotely watch the system status. About Monit Monit is a small Open Source utility for managing and monitoring Unix systems. Monit conducts automatic maintenance and repair and can execute actions in error situations. Additionally, Monit has a built-in lightweight HTTP(S) interface you can use to browse the Monit server and check the status of all monitored services. From the web-interface you can start, stop and restart processes and disable or enable monitoring of services. Monit Web Interface Installing and Configuring Monit on Ubuntu We can install monit by simply