How to automatically restart Apache/Nginx service when your website goes down using CRON
If you need to do some very basic heartbeat checks on a basic web server, Apache or nginx, and automatically restart the server when you no longer receive 200 responses this simple CRON script might be what you need.