A reverse proxy sits in front of your application servers and forwards client requests to them. Nginx is one of the most popular choices for this role — use our generator to build a correct, hardened config without writing a single line by hand.
Pass requests to the backend and forward the original host and client address, otherwise the app sees every request as coming from 127.0.0.1.
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}TLS termination, sensible proxy timeouts, response buffering choices, security headers and rate limiting. The generator emits these together and scores the result so you can see which hardening is missing.
Open the Reverse proxy generator
Nginx does not forward the client address unless you set X-Real-IP or X-Forwarded-For, and the application has to be configured to trust that header from the proxy.
With a URI part (a trailing slash counts) Nginx replaces the matched location prefix; without one it passes the original request URI unchanged. Mixing them up is a common source of 404s.