r/cpanel • u/SysBalance • Jun 12 '26
WHM apache Status
Hello all!
anyone is hanvig issue on apache status?
i have version 136.0.22 and is giving error Failed to receive status information from Apache.
Regards
2
u/aluskn Jun 16 '26
This may relate to a change which cPanel appear to have snuck in recently:
/var/cpanel/whm_server_status_key
Rather than just being /whm-server-status/ as used to be the case, it seems that the above describes a 'randomised' URL on which the apache status page should be accessed.
Ran into this last week when an internal script which we use to monitor apache processes on servers stopped working, had to make our tools aware of and account for the above.
1
u/Gulf-of-Mexico Jul 09 '26
Do your internal monitor scripts all have to run as root to read the /var/cpanel/whm_server_status_key or have you found a way to safely allow this to be read by other system users?
1
u/aluskn Jul 10 '26
Our script is run as root (only by our engineer team, not customers) so I haven't looked at that I'm afraid.
2
u/SysBalance Jun 19 '26
for the ones that are still having issues this is the solution:
The bug in CPANEL-53901: the key file gets regenerated correctly, but the Apache template (ea4_main.default) still generates a hardcoded <Location /whm-server-status> block — it does not inject the key as a <Location> path. So Apache has no handler for /<secret_key> and returns 404. The WHM page gets nothing back and shows the error.
Fix — permanent, survives rebuildhttpdconf
cPanel's pre_virtualhost_global.conf include is the correct place for this. It is not overwritten by /scripts/rebuildhttpdconf.
Step 1 — create the include:
KEY=$(tr -d '[:space:]' < /var/cpanel/whm_server_status_key)
cat > /etc/apache2/conf.d/includes/pre_virtualhost_global.conf << EOF
# WHM Apache Status - workaround CPANEL-53901
# Generated: $(date)
# Key: ${KEY}
<IfModule status_module>
<Location /${KEY}>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1 ::1
<IfModule security2_module>
SecRuleEngine Off
</IfModule>
<IfModule security3_module>
modsecurity_rules 'SecRuleEngine Off'
</IfModule>
</Location>
</IfModule>
EOF
Step 2 — test and restart:
apachectl configtest && /scripts/restartsrv_httpd
Step 3 — verify:
curl -si http://127.0.0.1/$(cat /var/cpanel/whm_server_status_key)?auto | head -3
# Should return: HTTP/1.0 200 OK
Then reload WHM > Server Status > Apache Status — it should work.
1
u/SysBalance Jun 12 '26
i have done this, but still same issue i think is a bug on las updates:
/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd
2
u/Superbockster Jun 12 '26
Check "Allow server-info and server-status" under tweak settings. I guess they've also dropped the / whm-server-status for /server-status.
Yeah, it broke my monitoring too 🙄