添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
叛逆的洋葱  ·  Sid Meiers ...·  1 年前    · 
瘦瘦的刺猬  ·  什么是水路运输·  1 年前    · 

NPM proxy to nginx - error 502 #2897

Closed as not planned
Closed as not planned
@dszymczuk

Description

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
  • Are you sure you're not using someone else's docker image?
  • Have you searched for similar issues (both open and closed)?

    Describe the bug
    Got 502 error when made proxy from NPM to nginx.

    Nginx Proxy Manager Version
    v2.10.2

    To Reproduce
    Steps to reproduce the behavior:

  • Use officially nginx image without any for application (app-front)
  • Run NPM
  • Make proxy to application via NPM for frontend
  • Make proxy to application via NPM for backend
  • Git error 502 when open frontend app. Backend works correctly.
  • Expected behavior

    Make proxy for frontend app correctly.

    Operating System
    Docker - Debian

    Additional context

    Application is accessible via port 8080 so nginx from frontend part works correctly.

    It looks like the problem is between NPM and nginx.

    Error logs from NPM (IP 172.23.0.2 is frontend):
    2023/05/07 08:45:59 [error] 9579#9579: *1174 connect() failed (111: Connection refused) while connecting to upstream, client: IP_CLIENT, server: krzysiek.dszymczuk.pl, request: "GET / HTTP/2.0", upstream: "http://172.23.0.2:8080/", host: "MYDOMAIN.COM", referrer: "http://MYDOMAIN.COM:8081/"

    2023/05/07 08:46:00 [error] 9579#9579: *1174 connect() failed (111: Connection refused) while connecting to upstream, client: IP_CLIENT, server: MYDOMAIN.COM, request: "GET /favicon.ico HTTP/2.0", upstream: "http://172.23.0.2:8080/favicon.ico", host: "MYDOMAIN.COM", referrer: "https://MYDOMAIN.COM/"