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:
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.
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
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
Faced with powerful Microsoft and early NetWare, Linux server operating system can be said to be a r