mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 01:45:54 +03:00
[GH-ISSUE #3255] 502 Bad Gateway, connect failed (refused) while connecting to upstream, Can't Load Either Frontend nor Backend #2196
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#2196
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @khalidrizki01 on GitHub (Oct 13, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/3255
Checklist
jc21/nginx-proxy-manager:latestdocker image?Describe the bug
I'm still new to nginx and full stack web deployment. I'm encountering a 502 Bad Gateway error every time I attempt to load both the frontend and backend. I've dockerized my application into frontend (React Vite) and backend (FastAPI Python) containers, then deployed them on a VPS. I've configured the proxy host using Nginx Proxy Manager. The configuration for the frontend proxy host is as follows:
And here's the configuration for the backend proxy host:
My Docker Compose file looks like this:
The error logs for both frontend and backend show a connection refused error with an upstream IP address of https://172.#.#.#. However, my VPS IP is 203.#.#.#. Below are the logs:
frontend proxy host error logs:
`
backend proxy host error logs:
Thank you for your help!
Nginx Proxy Manager Version
2.10.4
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Can load the frontend and backend from local pc
Screenshots

502 bad gateway
backend proxy host configuration:

frontend proxy host configuration:

Operating System
Ubuntu 22.04.1 LTS
Additional context
Additionally, I've included CORS settings in the backend and an API URL in the frontend as follows:
backend (fastapi python):
frontend (react vite)
Below is the docker compose for my nginx proxy manager:
@1xtr commented on GitHub (Oct 14, 2023):
If you use backend behind NPM you don't need

httpsHere is my config for one simple service. NPM redirect request to container by container name.
But I'm here because

custom locationsdon't work for me.Here is props
Nginx logs say that upstream don't exist
How I can solve this ?
@Meticulous7 commented on GitHub (Dec 1, 2023):
Also here for this issue. OP, ever find a solution?
@github-actions[bot] commented on GitHub (Jul 19, 2024):
Issue is now considered stale. If you want to keep it open, please comment 👍
@github-actions[bot] commented on GitHub (Aug 9, 2025):
Issue was closed due to inactivity.