Suggested Config Fix: 502 Bad Gateway on /dashboard when using Nginx Proxy Manager on a separate server #1012
UncleDoomVSSP
started this conversation in
Show and tell
Replies: 1 comment
-
|
Thank you for this! Immediately solved my problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Fix: 502 Bad Gateway on /dashboard when using Nginx Proxy Manager on a separate server
Symptom: The login page loads fine, but after logging in you get a
502 Bad Gateway(openresty) on/dashboardand other internal routes. Everything looks correctly configured and direct access to the container port works fine.Cause: SvelteKit sends a large number of
linkpreload headers during server-side rendering (SSR). Nginx's default proxy buffer size is too small to handle them, so NPM returns a 502 before the response reaches the browser.You can confirm this by checking your NPM proxy host error log:
Look for this line:
Fix: In NPM, edit the proxy host for your frontend domain, go to the Advanced tab, and add:
Save and the 502 should resolve immediately.
Also worth noting for NPM users:
PUBLIC_SERVER_URLmust stay ashttp://server:8000(the internal Docker hostname). Do not change it to your public backend URL, even though the error page hints to check it.Hope this saves someone a few hours!
Beta Was this translation helpful? Give feedback.
All reactions