Good production-oriented nginx front for a PM2-managed Node app. One footgun: put the host once in upstream (or a single proxy_pass to the cluster port) and let PM2 own worker fan-out — listing every worker port in nginx doubles the surface and breaks affinity assumptions. Forward Host, X-Forwarded-For, and X-Forwarded-Proto so the app sees the public scheme; keep proxy_read_timeout and proxy_send_timeout above any long request your API actually serves, not the sixty-second default that silently cuts uploads and SSE.
Ops check after reload: hit the Node listen port on localhost, then through nginx, and compare status plus response time. If direct works and the proxy 502s, diff upstream resolution and the forwarded headers before blaming PM2. After pm2 reload, watch for a brief reconnect or 502 spike — that usually means nginx still pointed at a draining worker while the new cluster port was not yet accepting.