mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-26 09:55:51 +03:00
[GH-ISSUE #532] Bad Gateway app login - serious issue #451
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#451
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 @mohdlatif on GitHub (Jul 29, 2020).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/532
Hi there, I have spent countless hours trying to configure nginxproxymanager on my server.
My server details:
OS: Centos 7
Nginx
Docker and docker compose latest version.
I am using https://vpssim.com/.
I created a subdomain and in the public_html folder I created both files config.json and docker-compose.yml
The first issue i faced is port 443 is used to generate certificate and 80 is being used by Nginx, so i have to find a way to change the ports.
So I did a little configuration by changing the port like this
Great, it works and the port 3306 is running

The issue after this is whenever i try to login it says Bad Gateway
I have read many threads about this issue,
Here is what I have done
Change "host": "db" to "host": "my server IP", - Does not work
Change "host": "db" to "host": "subdomain.mywebsite.com", - Does not work
Turned off Nginx via systemctl stop nginx.service and run on the defaults ports (port 443 and 80)- Does not work
Here is log file
2020/07/29 11:21:24 [error] 245#245: *1973 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81" 2020/07/29 11:21:30 [error] 245#245: *1975 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81" 2020/07/29 11:21:35 [error] 245#245: *1977 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81" 2020/07/29 11:21:40 [error] 245#245: *1979 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81" 2020/07/29 11:21:45 [error] 245#245: *1981 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81" 2020/07/29 11:21:49 [error] 245#245: *1984 connect() failed (111: Connection refused) while connecting to upstream, client: 202.186.36.196, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "nprxy.mywebsite.com:81", referrer: "http://nprxy.mywebsite.com:81/" 2020/07/29 11:21:51 [error] 245#245: *1986 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81" 2020/07/29 11:21:56 [error] 245#245: *1988 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81" 2020/07/29 11:21:59 [error] 245#245: *1984 connect() failed (111: Connection refused) while connecting to upstream, client: 202.186.36.196, server: nginxproxymanager, request: "POST /api/tokens HTTP/1.1", upstream: "http://127.0.0.1:3000/tokens", host: "nprxy.mywebsite.com:81", referrer: "http://nprxy.mywebsite.com:81/login" 2020/07/29 11:22:01 [error] 245#245: *1991 connect() failed (111: Connection refused) while connecting to upstream, client: 127.0.0.1, server: nginxproxymanager, request: "GET /api/ HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "127.0.0.1:81"How i can solve this issue.
Thanks.
@godsom commented on GitHub (Aug 21, 2020):
I got same issue after first run docker-compose from full guide.
from from my point database cannot start
I fixed by change docker-compose.yml from
db:
image: jc21/mariadb-aria:10.4
to
db:
image: mariadb:latest
@iga566 commented on GitHub (Sep 14, 2020):
i have the same issue
@codeagencybe commented on GitHub (Sep 19, 2020):
I got it working!
db_1 | 2020-09-19 12:31:16 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!All I did was delete the .ibdata1 file that shows 0kb
And then re-deploy the whole setup. Now it generates a new clean .ibdata file that is around 12Mb size
@pierow2k commented on GitHub (Sep 30, 2020):
Fixed the issue for me as well. Many thanks @godsom !
@wimmme commented on GitHub (Dec 3, 2020):
For me on a RPI 3 running Hypriot
does not work, but this does:
@anselal commented on GitHub (Jan 4, 2021):
@wimmme did not work for me on my rpi2
@mcarter960 commented on GitHub (Jan 23, 2021):
This worked for me also...running on a pi4. Thank you wimmme
creating config.json
and
editing docker-compose.yml
db:
image: yobasystems/alpine-mariadb:armhf
@anselal commented on GitHub (Jan 25, 2021):
This works on my RPi2
the trick besides changing the image for the DB is to use
version: "2"@cxdy commented on GitHub (Feb 17, 2021):
I'm running on Ubuntu 20.04 inside a virtual machine.
Docker version 20.10.3
docker-compose version 1.28.2
Here is my config:
Firewall:
Any ideas?
@jc21 commented on GitHub (Feb 17, 2021):
First rule of docker debugging:
@cxdy commented on GitHub (Feb 17, 2021):
@jc21 I resolved it by changing my MYSQL IP in the docker-compose.yml to the IP of the docker container. All is well now, thanks!
@jc21 commented on GitHub (Feb 17, 2021):
In your example you can also set the database host name to
dbsince it's in the same docker-compose file@MrEagle123 commented on GitHub (May 17, 2025):
Bad gatewayFailed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/cloudflare/I created file ./volume/resolv.conf with the following content:
nameserver 1.1.1.1and add "./volume/resolv.conf" to "volumes" section in docker-compose.yml
And the problem is solved!