Apache HTTP Server is the world's most widely deployed web server, powering everything from corporate intranets to high-traffic public websites. Yet most Apache monitoring stops at checking whether httpd is running — which completely misses the failures that matter most: a VirtualHost returning 500, an SSL certificate expiring in three days, a slow backend making every request time out, or a configuration reload that left Apache unable to bind its ports.
Vigilmon gives you external visibility into Apache HTTP Server uptime, response codes, latency, and SSL certificate health through HTTP probe monitoring and heartbeat checks. This tutorial covers the complete setup.
Why Apache Needs External Monitoring
Apache's built-in mod_status module exposes request rates, active connections, and worker slot counts — valuable for capacity planning, but not for uptime alerting. It cannot tell you:
- Whether Apache is reachable from the public internet (your LAN monitoring might still reach it while external traffic can't)
- Whether a specific VirtualHost is returning errors while the server process is running fine
- Whether your SSL certificates are within days of expiry
- Whether response times have climbed past acceptable thresholds for users
- Whether Apache is serving the correct content (a misconfigured VirtualHost can return the default index page)
External monitoring from Vigilmon probes the paths your users actually hit, from network locations outside your infrastructure.
Step 1: Enable mod_status for Local Health Inspection
Enable mod_status for internal diagnostics (restrict to localhost — do not expose publicly):
# /etc/apache2/conf-enabled/server-status.conf (Debian/Ubuntu)
# /etc/httpd/conf.d/server-status.conf (RHEL/CentOS)
<Location "/server-status">
SetHandler server-status
Require local
Require ip 127.0.0.1
</Location>
Reload Apache and verify locally:
apachectl configtest && systemctl reload apache2
curl http://127.0.0.1/server-status?auto
# Total Accesses: 42831
# Total kBytes: 394921
# CPULoad: .0123
# Uptime: 86401
# ReqPerSec: .496
# BytesPerSec: 4680
# BusyWorkers: 3
# IdleWorkers: 22
This gives you internal metrics. External monitoring through Vigilmon is what tells you when users can't reach your site at all.
Step 2: Add a Lightweight Health Endpoint
Create a dedicated health endpoint that Vigilmon can probe. This avoids checking your production URLs directly and gives you a clean 200/503 signal:
# Add to your VirtualHost configuration
<Location "/health">
SetHandler None
Options -All
Require all granted
</Location>
Then create the health file:
echo "OK" > /var/www/html/health
Or, for a dynamic check that verifies Apache can process PHP or serve from disk:
<?php
// /var/www/html/health.php
http_response_code(200);
header('Content-Type: application/json');
echo json_encode([
'status' => 'ok',
'server' => 'apache',
'timestamp' => date('c'),
]);
Test it:
curl -I http://localhost/health
# HTTP/1.1 200 OK
# Content-Type: text/plain
Step 3: Monitor Apache with Vigilmon
Log in to Vigilmon and go to Monitors → New Monitor.
HTTP Uptime Monitor
- Select HTTP / HTTPS as the monitor type
- Set the URL to your health endpoint:
https://your-domain.com/health - Set the check interval to 1 minute
- Under Expected response, configure:
- Status code:
200 - (Optional) Response body contains:
OKor"status":"ok"
- Status code:
- Set the timeout to
5000ms— Apache requests taking longer than 5 seconds indicate a problem - Save the monitor
You can also add monitors for individual VirtualHosts if you host multiple sites:
https://site-a.example.com/health
https://site-b.example.com/health
https://api.example.com/health
Set Up Monitors via the Vigilmon API
If you're managing multiple Apache servers, use the Vigilmon API to create monitors programmatically:
curl -X POST https://api.vigilmon.online/v1/monitors \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Apache HTTP Server - Main",
"type": "http",
"url": "https://your-domain.com/health",
"interval": 60,
"timeout": 5000,
"expected_status": 200,
"regions": ["us-east", "eu-west", "ap-southeast"]
}'
Response:
{
"id": "mon_apache_01",
"name": "Apache HTTP Server - Main",
"status": "active",
"url": "https://your-domain.com/health",
"interval": 60,
"uptime_7d": 100.0
}
Step 4: Monitor SSL Certificate Expiry
Apache sites almost always serve HTTPS. An expired certificate makes your site completely unreachable for users without a browser bypass.
Vigilmon monitors SSL certificates automatically when you add an HTTPS monitor. You'll receive an alert:
- 30 days before expiry
- 14 days before expiry
- 7 days before expiry
No configuration needed — just use the https:// scheme when adding your monitor.
You can also add a standalone SSL monitor to check expiry independent of your HTTP check:
- Go to Monitors → New Monitor
- Select SSL Certificate as the monitor type
- Enter your domain:
your-domain.com - Set alert thresholds (default: 30, 14, 7 days)
- Save
If you run Apache with Let's Encrypt and certbot, the SSL monitor gives you advance warning if certbot renew has silently failed.
Step 5: Monitor Response Time and Latency
Slow responses are a failure mode too. Apache can return 200 while taking 8 seconds — technically "up" but effectively broken for users.
In your Vigilmon monitor settings:
- Open the monitor for your Apache health endpoint
- Go to Latency Alerting
- Set a latency threshold, e.g.
2000ms(2 seconds) - Enable latency alerts to trigger if response time exceeds the threshold for 3 consecutive checks
This catches slow backends, runaway CGI scripts, or a full Apache worker pool making new requests queue up.
Step 6: Configure Alert Routing
When Apache goes down, you need immediate notification — not a daily digest.
Go to Alert Channels → Add Channel and configure one or more of:
- Email — immediate notification to your on-call address
- Webhook — integrate with Slack, PagerDuty, Opsgenie, or a custom handler
- SMS — for critical infrastructure (paid plans)
Example webhook payload Vigilmon sends when Apache goes down:
{
"monitor_name": "Apache HTTP Server - Main",
"status": "down",
"url": "https://your-domain.com/health",
"error": "Connection timed out after 5000ms",
"started_at": "2026-01-15T09:14:22Z",
"checked_from": "us-east-1"
}
Assign the alert channel to your Apache monitors and set escalation rules — for example, page on-call only after 2 consecutive failures to avoid single-flap alerts.
Step 7: Add Monitors to a Public Status Page
If your Apache server hosts customer-facing applications, publish a status page so users can check availability without calling support.
- In Vigilmon, go to Status Pages → New Status Page
- Name it (e.g. "Service Status")
- Add your Apache monitors as components:
- "Web Server" →
Apache HTTP Server - Main - "API" →
Apache API endpoint
- "Web Server" →
- Publish
You get a public URL at https://status.vigilmon.online/your-page showing real-time uptime for each monitored component. Link it from your site's footer, your documentation, and your support portal.
Putting It All Together
Here's a summary of the monitoring setup for a typical Apache deployment:
| Monitor | Type | Check | Alert threshold |
|---------|------|-------|----------------|
| Apache main site | HTTP | /health → 200 | 1 consecutive failure |
| SSL certificate | SSL | your-domain.com | 30 days before expiry |
| Response latency | HTTP | /health < 2000ms | 3 consecutive slow responses |
| API VirtualHost | HTTP | /api/health → 200 | 1 consecutive failure |
This gives you complete external visibility into Apache availability, SSL health, and performance — not just whether the process is running.
Get Started for Free
Vigilmon monitors Apache HTTP Server from multiple global regions with 1-minute check intervals, SSL certificate tracking, and instant alerts. The free tier includes up to 5 monitors with no credit card required.
Set up your first Apache monitor in under two minutes: vigilmon.online