You wrote proxy_pass http://localhost:3000;, checked it in the browser, saw it working, and called it done. But you couldn't actually explain why it works. What's happening between nginx and the app? Where is the request going? You probably couldn't answer that with any confidence.
Getting something working and understanding how it works are two different things. This article (Part 1) is about the how. Once you have that, the next question becomes which tool to use. In Part 2, I'll break down the design philosophies behind nginx, Caddy, Traefik, and HAProxy, and give you a framework for choosing the one that fits your stack.
Where the browser is actually connecting
When a browser sends a GET to https://api.example.com/users, it resolves api.example.com via DNS and opens a TCP connection to port 443 at that IP. Who's on the other end of that connection?
In a setup with a reverse proxy, it's not the app server — it's the proxy.






