jlesage / docker-nginx-proxy-manager

Docker container for Nginx Proxy Manager
MIT License
756 stars 166 forks source link

502 Bad Gateway, Mikrotik #297

Open Men1steR opened 1 year ago

Men1steR commented 1 year ago

Current Behavior

Hi all! I use this container on mikrotik host, the webserver is also in docker on the same bridge, on the network 10.17.224.0/27, but when I connect, I get 502 Bad Gateway, packets from container don't even go out towards the webserver

Expected Behavior

No response

Steps To Reproduce

No response

Environment

Container creation

Created a container using Mikrotik, forwarding only the storage

Container log

I can’t look, but if you tell me where they are in the container, I’ll get them

Container inspect

No response

Anything else?

No response

jlesage commented 11 months ago

Did you try to connect to the container (docker exec -ti <container name> sh) and then ping the IP of the web server ?

The container's log can be obtained by executing docker logs <container name>. The output of docker inspect <container name> would also be useful to have the full configuration of the container.

You should also share the configuration of your proxy host.

tan00 commented 8 months ago

I have same error , the nginx log is

/config/log # cat fallback_error.log
2023/11/08 15:40:10 [error] 403#403: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 10.10.100.200, server: nginxproxymanager, request: "POST /api/tokens HTTP/1.1", upstream: "http://127.0.0.1:3000/tokens", host: "10.10.100.47:8181", referrer: "http://10.10.100.47:8181/login"

upstream 127.0.0.1:3000 is not listen

/config/log # netstat  -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:4443            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      -
tcp        0      0 0.0.0.0:8181            0.0.0.0:*               LISTEN      -
tcp        0      0 :::4443                 :::*                    LISTEN      -
tcp        0      0 :::8080                 :::*                    LISTEN      -
tcp        0      0 :::8181                 :::*                    LISTEN      -