#!/usr/bin/env bash # JoeC Apache/PHP-FPM read-only diagnostic. No restart or config edits. set -uo pipefail printf 'UTC: %s\n' "$(date -u +'%FT%TZ')" if command -v apache2ctl >/dev/null 2>&1; then apache2ctl configtest 2>&1 || true elif command -v httpd >/dev/null 2>&1; then httpd -t 2>&1 || true fi if command -v systemctl >/dev/null 2>&1; then for unit in apache2 httpd php-fpm; do printf '%s: ' "$unit" systemctl is-active "$unit" 2>/dev/null || true done systemctl list-units 'php*-fpm.service' --no-pager --no-legend || true fi if command -v curl >/dev/null 2>&1; then printf '\nLoopback health:\n' curl --silent --show-error --max-time 5 --include -H 'Host: joec.pw' http://127.0.0.1:8080/healthz.txt || true printf '\nPHP GET method check; expect 405 JSON:\n' curl --silent --show-error --max-time 5 --include -H 'Host: joec.pw' http://127.0.0.1:8080/api/contact.php || true fi printf '\nNever publish PHP source or credentials.\n'