set -u CP=/opt/docker/infra/Caddyfile echo "===== 1. Caddyfile /userbase blocks (line numbers) =====" grep -n "userbase" "$CP" echo echo "===== 2. Full /userbase route region (lines 40-80) =====" sed -n '40,80p' "$CP" echo echo "===== 3. Caddy mounts in container =====" docker inspect caddy --format '{{range .Mounts}}{{.Source}} -> {{.Destination}}{{"\n"}}{{end}}' echo echo "===== 4. Running caddy admin config: does it contain 'userbase'? =====" docker exec caddy curl -s localhost:2019/config/ | grep -i "userbase" | head -n 20 echo "--- end grep ---" echo echo "===== 5. Caddy container status =====" docker ps --filter name=caddy --format '{{.Names}} {{.Status}}' echo echo "===== 6. Direct test via 127.0.0.1 with Host header =====" for p in /userbase/ /userbase/index.html /userbase/static/js/ /userbase/api/x; do code=$(curl -s -o /tmp/ub_body -w "%{http_code}" -H "Host: www.yunhaixingtong.com" "http://127.0.0.1$p") echo "$p -> $code | $(head -c 80 /tmp/ub_body | tr -d '\n')" done