← back to Japan Enrich
scripts/nginx-diagnose.sh
16 lines
#!/usr/bin/env bash
# READ-ONLY: find which nginx confs declare the distributor hostnames (the conflict source),
# so we know which block to clean. Changes nothing. Run under Steve.
ssh root@45.61.58.125 bash -s <<'REMOTE'
echo "=== enabled confs that declare our distributor hostnames ==="
grep -rl "eijffinger.designerwallcoverings.com\|koroseal-sg.designerwallcoverings.com" /etc/nginx/sites-enabled/ /etc/nginx/sites-available/ 2>/dev/null
echo
echo "=== each such conf: its server_name / listen / proxy_pass / acme lines ==="
for f in $(grep -rl "designerwallcoverings.com" /etc/nginx/sites-enabled/ 2>/dev/null); do
if grep -qE "eijffinger|koroseal-sg|distributor-microsites|japan.designerwallcoverings" "$f"; then
echo "--- $f ---"
grep -nE "server_name|listen |proxy_pass|acme-challenge|ssl_certificate " "$f" | head -25
fi
done
REMOTE