Keep Apache HTTP Windows Service running 24/7

How to Keep the Apache HTTP Windows Service Running 24/7 with Service Protector

Automatically restart your Apache web server whenever it crashes or stops serving pages. Add a local health check to achieve 100% uptime for your web applications today


Last Updated on October 7, 2026

The Apache HTTP Server is the Internet's most popular web server.

On Windows, Apache runs as a service:


To protect the Apache Windows Service with Service Protector:

  1. Download, install and configure the Apache web server, if necessary.

    We installed Apache Lounge for this tutorial.

  2. Download and install Service Protector, if necessary.

  3. Start Service Protector.

  4. Select Protector > Add to open the Add Protector window:

    Add Protector

  5. 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 installed Apache version 2.4.69, the service is named Apache2.4 on our machine:

    Apache Windows Service: General Tab

  6. Next, let's set up a web server health check. With that in place, Service Protector will restart Apache if it ever stops serving pages.

    1. Switch to the Monitor tab. Check the Whenever it fails a periodic sanity check box and click the Set button:

      Apache Windows Service: Add a sanity check

    2. In the Add Sanity Check window, select the Check that a web server is responding properly option and click Next to proceed:

      Add a web sanity check

    3. Enter the URL that Service Protector should monitor. This could be a dedicated health check address or anything else you think is appropriate. Both HTTP and HTTPS are supported.

      We kept it simple by checking the root page (http://localhost):

      Enter the health check URL

      Click Next to continue.

    4. Specify how often Service Protector should fetch the URL. The default of every 5 minutes should be fine but you can check more often if you like.

      After you're done, click Next to move on:

      How often to check the URL

    5. And finally, confirm your settings:

      Confirm your sanity check settings

      If everything looks good, click Add to record your new sanity check and return to the Monitor tab.

  7. Click the Save button. In a couple of seconds, an entry for Apache will show up in the Service Protector window.

    The green shield indicates that Service Protector is already babysitting Apache:

    Apache Windows Service: Protected

  8. 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, recycle Apache periodically to keep performance snappy, and much more.


Trouble protecting the Apache Windows Service?

  • From Service Protector, select Protector > Report Activity > Today to bring up an HTML report detailing the interaction between Service Protector and Apache.

  • Browse the Service Protector FAQ for answers to commonly asked questions and troubleshooting tips.

  • Contact us and we will be happy to help!