[GH-ISSUE #18] 502 Bad Gateway #8

Open
opened 2026-02-27 14:58:06 +03:00 by kerem · 1 comment
Owner

Originally created by @nckrwlmn on GitHub (Mar 13, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/docker-nginx-full/issues/18

I keep getting a 502 bad gateway when I try to use the proxy.
Here is the code i am using for the yml file.

version: '3'
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '81:81'
- '443:443'
environment:
DB_MYSQL_HOST: "db"
DB_MYSQL_PORT: 3306
DB_MYSQL_USER: "npm"
DB_MYSQL_PASSWORD: "npm"
DB_MYSQL_NAME: "npm"
volumes:
- ./data:/data
- ./letsencrypt:/etc/letsencrypt
db:
image: 'jc21/mariadb-aria:latest'
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: 'npm'
MYSQL_DATABASE: 'npm'
MYSQL_USER: 'npm'
MYSQL_PASSWORD: 'npm'
volumes:
- ./data/mysql:/var/lib/mysql

What could be going on? Ive tried every single tutorial on the internet for this and I cant get it to work on ubuntu 22.

Originally created by @nckrwlmn on GitHub (Mar 13, 2023). Original GitHub issue: https://github.com/NginxProxyManager/docker-nginx-full/issues/18 I keep getting a 502 bad gateway when I try to use the proxy. Here is the code i am using for the yml file. version: '3' services: app: image: 'jc21/nginx-proxy-manager:latest' restart: unless-stopped ports: - '80:80' - '81:81' - '443:443' environment: DB_MYSQL_HOST: "db" DB_MYSQL_PORT: 3306 DB_MYSQL_USER: "npm" DB_MYSQL_PASSWORD: "npm" DB_MYSQL_NAME: "npm" volumes: - ./data:/data - ./letsencrypt:/etc/letsencrypt db: image: 'jc21/mariadb-aria:latest' restart: unless-stopped environment: MYSQL_ROOT_PASSWORD: 'npm' MYSQL_DATABASE: 'npm' MYSQL_USER: 'npm' MYSQL_PASSWORD: 'npm' volumes: - ./data/mysql:/var/lib/mysql What could be going on? Ive tried every single tutorial on the internet for this and I cant get it to work on ubuntu 22.
Author
Owner

@nckrwlmn commented on GitHub (Jan 20, 2025):

The issue is, the downstream service is not reachable by the proxy.

If you're having this issue, make sure that you are pointing to the right IP and port and protocol downstream.

And make sure that service is actually running and not rebooting or off.

<!-- gh-comment-id:2603306209 --> @nckrwlmn commented on GitHub (Jan 20, 2025): The issue is, the downstream service is not reachable by the proxy. If you're having this issue, make sure that you are pointing to the right IP and port and protocol downstream. And make sure that service is actually running and not rebooting or off.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-nginx-full#8
No description provided.