Files
dsh_ai1net_server/归档/迁移/域名迁移_ai1net_20260919/probe47.sh
T

24 lines
1.2 KiB
Bash
Raw Normal View History

set +e
echo "=== [P1] 放置探针文件 ==="
for d in /www/wwwroot/default /www/wwwroot/47.77.182.89 /www/wwwroot/dsh.alotbuy.com; do
if mkdir -p "$d" 2>/dev/null && echo "MARKER-AI1NET-OK" > "$d/probe-ai1net.txt" 2>/dev/null; then
echo "OK $d/probe-ai1net.txt ($(stat -c%s "$d/probe-ai1net.txt" 2>/dev/null) B)"
else
echo "FAIL $d"
fi
done
echo "=== [P2] 各 80 vhost 的 server_name / root ==="
for f in 0.default.conf 47.77.182.89.conf; do
echo "--- $f ---"
grep -nE "server_name|^\s*root |listen " "/www/server/panel/vhost/nginx/$f" 2>/dev/null | head -8
done
echo "=== [P3] 本机按 Host=ai1net.com 请求 80 ==="
curl -s -o /dev/null -w "Host=ai1net.com http://127.0.0.1/ => %{http_code}\n" -H "Host: ai1net.com" http://127.0.0.1/ 2>&1 | tail -1
curl -s -H "Host: ai1net.com" http://127.0.0.1/probe-ai1net.txt 2>&1 | head -2
echo "=== [P4] 443 SNI 证书 ==="
for s in ai1net.com alotbuy.com; do
echo "--- SNI=$s ---"
echo | timeout 8 openssl s_client -connect 127.0.0.1:443 -servername "$s" 2>/dev/null | openssl x509 -noout -subject -issuer -dates 2>/dev/null | head -4
done
echo "=== [P5] 公网 IP ==="
curl -s --max-time 8 https://api.ipify.org 2>/dev/null; echo