In order to achieve a highly available Apache-based web environment, after Apache automatically stops running for various reasons, you want to restore website access immediately. This requires a tool to monitor Apache's running status and automatically restart the httpd service. I found the relevant information on the Internet and rewrote the following simple monitoring and restart script:
Principle
Local access to the Apache service through the server (similar to the user accessing the website), such as no more than 15s Returns the normal 220 header code, indicating that the Apache service has stopped running, and immediately restarts the httpd service.
Usage Method
Method 1:
1. Execute vi on the Linux server to edit a new script, copy the following script code, and then exit and save.
Bash[root@localhost /]# vi /opt/autorshttpd
#!/bin/bash
URL="http://127.0.0.1/"
curlit()
{
curl --connect-timeout 15 --max-time 20 --head --silent "$URL"
When a person is operating under Linux, they may encounter that the file they are doing is accident
Executing programs are called processes. When a program is stored in an executable file and is runni
you want under Linux How to install the jdk you want under Linux? Last time we talked about how to u
Introduction to Soft InterruptsInsert processing that can be deferred from the hard interrupt handl
Linux tuning (maximum number of connections modified)
How to configure nVIDIA graphics card under the Linux system
Linux more command using tutorial
The three query methods for the last reboot time of the Linux system
Bridge implementation of the linux protocol stack (from the bridge configuration (2))
Rookie class: teach you how to improve the security of Linux system
How to install bt5 - bt5 combat installation tutorial under windows8 system
Installing Arch Linux in my Defy
Modify the X-Cache in Squid's Header to Powered-By-LinuxTone
High availability of Linux operating system clusters
View file encoding, file encoding format conversion and file name encoding conversion under Linux
Where is the Win7 system camera? Win7 camera is missing, how to get back?
How to recover the built-in application that Win10 system is uninstalled?
Win7 method to modify window color
You can not miss the skills to install Windows 8 Release Preview
I want Vista My Network Places to be unable to see other computers. [Fig.
Solve Win8.1 Safe Boot is not properly configured
Win7 IE8 home page was tampered with repair process
Win7 system sharing wifi prompts error 1203 solution
Solve Win 7 network share failure
How to completely delete files in Win10 cipher command to completely remove Win10 files