V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ieheiheihei
V2EX  ›  服务器

请教一下关于 nginx 反向代理的 104: Connection reset by peer 错误

  •  
  •   ieheiheihei · 2018-09-15 15:38:14 +08:00 · 5657 次点击
    这是一个创建于 2021 天前的主题,其中的信息可能已经有所发展或是发生改变。
    由于公司有个网站很早之前就备案了,最近阿里云说有什么资料不符,要变更备案信息,公司比较忙,就没怎么在意。谁知道突然备案信息没有了,网站提示未备案。临时买了台香港服务器装了个 ngxin 做反向代理。刚开始都很正常,但是隔一两个小时网页就提示错误,查询 nginx 中的 errorlog 都是 104: Connection reset by peer 错误,重新部署过两次 NGINX 后都会这样。想请教下 V 友有遇到过这种情况的吗?
    10 条回复    2018-09-15 21:52:17 +08:00
    alect
        1
    alect  
       2018-09-15 17:15:25 +08:00
    你反代的源站是在国内?
    ieheiheihei
        2
    ieheiheihei  
    OP
       2018-09-15 17:17:43 +08:00
    @alect #1 是的
    alect
        3
    alect  
       2018-09-15 17:19:30 +08:00
    @ieheiheihei 你反代的源站不能用域名形式,或者换端口,要不然还是过不了机房的备案检测
    ieheiheihei
        4
    ieheiheihei  
    OP
       2018-09-15 17:20:27 +08:00
    @alect #3 域名解析的是香港服务器,反向代理配置的 ip:80
    ieheiheihei
        5
    ieheiheihei  
    OP
       2018-09-15 17:21:28 +08:00
    @alect #3 而且网页直接访问 ip 可以正常访问
    alect
        6
    alect  
       2018-09-15 17:26:46 +08:00
    @ieheiheihei 还可能是因为 nginx 的 buffer 太小,timeout 太小。。
    alect
        7
    alect  
       2018-09-15 17:27:28 +08:00
    又或者迷之错误(墙)
    ieheiheihei
        8
    ieheiheihei  
    OP
       2018-09-15 18:22:59 +08:00
    @alect #6 buffer 和 timeout 都改过
    可能吧
    ieheiheihei
        9
    ieheiheihei  
    OP
       2018-09-15 18:23:26 +08:00
    @alect #7 弄了几个小时都不行
    coolloves
        10
    coolloves  
       2018-09-15 21:52:17 +08:00
    用非 80 试试?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1183 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:08 · PVG 07:08 · LAX 16:08 · JFK 19:08
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.