1) 清空所有相关日志
# 清空NPM容器日志
docker logs nginx-proxy-manager --tail 0 > /dev/null
# 清空nginx访问日志
> /opt/npm/data/logs/proxy-host-3_access.log
# 清空nginx错误日志
> /opt/npm/data/logs/proxy-host-3_error.log
# 清空系统日志(可选)
journalctl --vacuum-time=1s
2) 确认当前配置状态
# 查看当前nginx配置
cat /opt/npm/data/nginx/proxy_host/3.conf | grep -A 5 -B 5 "proxy_pass"
# 确认端口监听状态
netstat -tlnp | grep -E "(80|443|8124)"
3) 系统性测试步骤
步骤1:测试FRP隧道
echo "=== 测试FRP隧道 ==="
curl -I http://127.0.0.1:8124/
curl http://127.0.0.1:8124/ | head -5
步骤2:测试NPM HTTP代理
echo "=== 测试NPM HTTP代理 ==="
curl -I http://vlanhub.com/
curl http://vlanhub.com/ | head -5
步骤3:测试NPM HTTPS代理
echo "=== 测试NPM HTTPS代理 ==="
curl -I https://vlanhub.com/
curl https://vlanhub.com/ | head -5
步骤4:检查日志
echo "=== 检查nginx错误日志 ==="
tail -10 /opt/npm/data/logs/proxy-host-3_error.log
echo "=== 检查nginx访问日志 ==="
tail -10 /opt/npm/data/logs/proxy-host-3_access.log