Journal / Infrastructure
A reverse proxy, explained
A reverse proxy accepts requests on a public endpoint and forwards them to the appropriate internal service.
The underlying problem
For a typical website, Nginx can terminate TLS on port 443, serve static files directly and proxy dynamic routes to an application listening only on localhost. This reduces the number of public entry points and centralizes common HTTP configuration.
A practical approach
Keep application ports private when possible. Validate hostnames, configure timeouts and request limits, and test certificate renewal. A reverse proxy is a useful boundary, but it does not replace application security.