A very common setup, at home and at work: one small server faces the internet and runs the reverse
proxy in Docker. The actual services live on other machines in the private network.
Internet βββΊ :80/:443 gateway server (reverse proxy in Docker) βββΊ 10.0.0.21:8080 wiki βββΊ 10.0.0.22:3000 app βββΊ nas.corp.example:5001 NAS
Enter fullscreen mode
Exit fullscreen mode
You add a host, point it at app01:8080 , save, open the site and get 502 Bad Gateway . From your
laptop the service works. From the gateway server itself, curl http://app01:8080 works too.
Here are the four causes I have run into most often, why they happen, and how to check each one in a
minute. They apply to nginx, Nginx Proxy Manager, OpenResty-based proxies and most other proxies
that run in a container.
1.β¦