fix(cac): healthcheck fails only on no answer or 5xx, not 4xx #34

Merged
jknapp merged 1 commits from fix/healthcheck-4xx into trunk 2026-10-22 15:04:11 +00:00
Owner

The Apache (cac) image healthcheck was curl -f http://localhost/, which also fails on 4xx. A new standalone site with an empty docroot gets 403, so it shows unhealthy forever, and WHP's monitor restarts it as "PHP wedged" 3 times an hour (seen on the fresh-install test VM).

Now: unhealthy only on no answer (000) or a 5xx.

Tested the new command inside a running cac:php85 container on the test VM: empty docroot (403) returns 0; no listener (000) returns 1.

WHP PR #111 also stops the monitor restarting on a 4xx healthcheck, so the fleet is covered before these images roll out. Takes effect per site on its next recreate.

🤖 Generated with Claude Code

The Apache (cac) image healthcheck was `curl -f http://localhost/`, which also fails on 4xx. A new standalone site with an empty docroot gets 403, so it shows **unhealthy** forever, and WHP's monitor restarts it as "PHP wedged" 3 times an hour (seen on the fresh-install test VM). Now: unhealthy only on no answer (000) or a 5xx. Tested the new command inside a running cac:php85 container on the test VM: empty docroot (403) returns 0; no listener (000) returns 1. WHP PR #111 also stops the monitor restarting on a 4xx healthcheck, so the fleet is covered before these images roll out. Takes effect per site on its next recreate. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jknapp added 1 commit 2026-10-22 12:41:42 +00:00
curl -f also failed on 403/404, so a new site with an empty docroot showed
unhealthy forever and WHP's monitor restarted it as PHP wedged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jknapp merged commit e7d4db5bd3 into trunk 2026-10-22 15:04:11 +00:00
jknapp deleted branch fix/healthcheck-4xx 2026-10-22 15:04:11 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: cloud-hosting-platform/cloud-apache-container#34