|
How to Keep the Apache HTTP Windows Service Running 24/7 with Service Protector |
Automatically restart your Apache web server when it crashes or stops serving pages. Achieve 100% uptime for your web applications today!
The Apache HTTP Server is the Internet's most popular web server.
To protect Apache with Service Protector:
-
Download, install and configure the Apache web server, if necessary.
-
Download and install Service Protector, if necessary.
-
Start Service Protector.
-
Select Protector > Add to open the Add Protector window:
-
On the General tab:
-
In the Service to protect field, choose the Apache windows service. This will be named ApacheX.Y, where X.Y represents the software's version number. Since we have installed Apache version 2.2.22, our service is named Apache2.2
You will notice a green circle on the left if the Apache service is already running, as pictured below.
-
Click over to the Monitor tab, where we will set up a failure detection script to tell Service Protector when Apache has failed and is not serving pages.
-
Follow these instructions to create the failure detection BAT file. We have called ours check-web-server.bat and placed it in a folder called C:\ApacheTools.
-
Click the "..." button in the Whenever it fails a "sanity check" section and specify the full path to the batch file.
Note that the default of having Service Protector check your web server every 30 seconds should be fine but please feel free to increase the timing if you suspect that checking so often will generate too much load on
your server. (Of course, increasing that time will impact the failure detection and recovery cycle...)
-
Click the Save button. In a couple of seconds, an entry for Apache will show up in the Service Protector window.
Apache is probably already running but it is not yet being protected by Service Protector (as pictured below).
-
To start protection, choose Protector > Start "Apache2.2". The shield icon will go to green to indicate that Apache is being protected:
-
That's it! Next time your computer boots, Apache will start and Service Protector will begin monitoring the service to promptly restart it if it fails.
We encourage you to edit Apache in Service Protector and check out the many other settings that may be appropriate for your environment.
For example, send an email when the service fails, restart Apache periodically to keep performance snappy, and much more.
Trouble protecting the Apache Windows Service?
|
Peace of mind for your important Windows Services!
|
|
|
Step-by-step guides for 70+ Services
|