What is probably broken
The domain opens, Nginx responds, but every request ends in 502 while the app seems fine locally.
The domain opens, Nginx responds, but every request ends in 502 while the app seems fine locally.
Nginx proxies to a healthy app process, logs show the real failure, and the domain returns the app instead of a gateway error.
STEP 01
Do not start with Nginx config. First confirm the upstream app is running and listening where Nginx expects it.
STEP 02
The most common 502 is a mismatch between Nginx `proxy_pass` and the actual app port or socket.
STEP 03
Nginx error logs usually tell you whether the upstream refused, timed out, or returned invalid headers.
Quick check
If you cannot tick all five, we can fix it. Send us the repo and we handle the rest.
Free checklist
Get the exact 5-step checklist we run before every deploy. No fluff, just the things that actually break.
Done-for-you deploy
Fixed price per repo. 24h delivery or full refund. No hourly billing.
Related guides
A practical Next.js VPS deployment guide covering build output, Node runtime, Nginx reverse proxy, SSL, environment variables, and GitHub-based deploys.
Read guideHit serverless limits or seat pricing on Vercel? Move your AI-built app to a VPS for lower costs, long-running jobs, and full control. Step-by-step migration guide.
Read guidev0-generated apps need a repo, env vars, and server process before going live. Move your app from preview to a VPS you own with lower recurring cost.
Read guide