Hi,
I found a nice script to automatically restart Apache (if it's down). Hopefully, this will control the downtime on server 1
Here's the script:
Nice and simple
It just checks if httpd is on the process list, and if not, restart it. Quite a nice little script.
Just set that to run every 10 minutes as a cron job on the server (it will cause very little server load, if any, it takes less than a second to check if Apache is running), and our Apache problems are solved.
I found a nice script to automatically restart Apache (if it's down). Hopefully, this will control the downtime on server 1
Here's the script:
| Code: |
|
checkapache=`ps ax | grep -v grep | grep -c httpd` if [ $checkapache -le 0 ] then /etc/init.d/httpd restart fi |
Nice and simple
Just set that to run every 10 minutes as a cron job on the server (it will cause very little server load, if any, it takes less than a second to check if Apache is running), and our Apache problems are solved.
