NginxProxyManager / nginx-proxy-manager

Docker container for managing Nginx proxy hosts with a simple, powerful interface
https://nginxproxymanager.com
MIT License
23.27k stars 2.7k forks source link

502 bad gateway #4116

Open not-chees opened 3 weeks ago

not-chees commented 3 weeks ago

Hi, I just setup nginx proxy manager and tried it out. However, when I try to reach a server, I get a 502 bad gateway. I have tried to use this with 3 servers, so it is not the server but nginx that has the problem.

GitXpresso commented 3 weeks ago

Google cloud shell don't accept port that has 2 characters in them example 127.0.1:21

Codixer commented 3 weeks ago

Where in the world does the 21 come from?

GeneralUser-NonDev commented 2 weeks ago

following, Mine is doing this for my homeassistant path. all my others eventually worked, well, loaded (took loading them several times and messing with the different settings in the host config). its supposed to point to 192.168.107.173 on port 8123, but i just get "502 bad gateway - openresty".

Codixer commented 2 weeks ago

Ok so, a guess here. If you look at the logs, does letsencrypt have issues with installing?

GeneralUser-NonDev commented 2 weeks ago

with trying all kinds of combinations of network settings and such (Bridge, Host, Custom Docker Network, etc) My instillation on my Unraid got to the point that it will now not let me log in. It brings up the login page and I can enter my login but then it just stays on that page and Firefox diagnostics shows "ns error connection refused". The instillation on my Proxmox container I don't know how to look at logs, that one won't let me make certs at all, I just get "internal error".

any tricks to clean reinstall it and keep the current proxy hosts/logins?

unraid logs (what I'm able to access) is as follows:

text  error  warn  system  array  login  

[cont-init   ] 55-nginx-proxy-manager.sh: - /config/nginx/proxy_host/2.conf
[cont-init   ] 55-nginx-proxy-manager.sh: - /config/nginx/proxy_host/6.conf
[cont-init   ] 55-nginx-proxy-manager.sh: - /config/nginx/proxy_host/1.conf
[cont-init   ] 55-nginx-proxy-manager.sh: - /config/nginx/proxy_host/4.conf
[cont-init   ] 55-nginx-proxy-manager.sh: - /config/nginx/ip_ranges.conf
[cont-init   ] 55-nginx-proxy-manager.sh: - /config/nginx/resolvers.conf
[cont-init   ] 55-nginx-proxy-manager.sh: terminated successfully.
[cont-init   ] 85-take-config-ownership.sh: executing...
[cont-init   ] 85-take-config-ownership.sh: terminated successfully.
[cont-init   ] 89-info.sh: executing...
    ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
    │                                                                      │
    │ Application:           Nginx Proxy Manager                           │
    │ Application Version:   2.11.3                                        │
    │ Docker Image Version:  24.07.1                                       │
    │ Docker Image Platform: linux/amd64                                   │
    │                                                                      │
    ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
[cont-init   ] 89-info.sh: terminated successfully.
[cont-init   ] all container initialization scripts executed.
[init        ] giving control to process supervisor.
[supervisor  ] loading services...
[supervisor  ] loading service 'default'...
[supervisor  ] loading service 'app'...
[supervisor  ] loading service 'nginx'...
[supervisor  ] loading service 'logmonitor'...
[supervisor  ] service 'logmonitor' is disabled.
[supervisor  ] loading service 'logrotate'...
[supervisor  ] service 'logrotate' is disabled.
[supervisor  ] loading service 'cert_cleanup'...
[supervisor  ] all services loaded.
[supervisor  ] starting services...
[supervisor  ] starting service 'nginx'...
[supervisor  ] starting service 'app'...
[app         ] [11/4/2024] [8:35:30 AM] [Global   ] › ℹ  info      Using Sqlite: /data/database.sqlite
[supervisor  ] all services started.
[cert_cleanup] ----------------------------------------------------------
[cert_cleanup] Let's Encrypt certificates cleanup - 2024/11/04 08:35:31
[cert_cleanup] ----------------------------------------------------------
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-1/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-1/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-1/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-1/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-2/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-2/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-2/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-2/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-3/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-3/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-3/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-3/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-5/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-5/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-5/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-5/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-6/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-6/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-6/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-6/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-7/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-7/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-7/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-7/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-8/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-8/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-8/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-8/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-9/privkey3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-9/cert3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-9/chain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-9/fullchain3.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-14/cert1.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-14/privkey1.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-14/chain1.pem.
[cert_cleanup] Keeping /etc/letsencrypt/archive/npm-14/fullchain1.pem.
[cert_cleanup] 36 file(s) kept.
[cert_cleanup] 0 file(s) deleted.
[app         ] [11/4/2024] [8:35:31 AM] [Migrate  ] › ℹ  info      Current database version: none
[app         ] [11/4/2024] [8:35:31 AM] [Setup    ] › ℹ  info      Logrotate Timer initialized
[app         ] [11/4/2024] [8:35:31 AM] [Global   ] › ⬤  debug     CMD: logrotate -s /config/logrotate.status /etc/logrotate.d/nginx-proxy-manager
[app         ] [11/4/2024] [8:35:32 AM] [Setup    ] › ℹ  info      Logrotate completed.
[app         ] [11/4/2024] [8:35:32 AM] [IP Ranges] › ℹ  info      Fetching IP Ranges from online services...
[app         ] [11/4/2024] [8:35:32 AM] [IP Ranges] › ℹ  info      Fetching https://ip-ranges.amazonaws.com/ip-ranges.json
[app         ] [11/4/2024] [8:35:36 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v4
[app         ] [11/4/2024] [8:35:40 AM] [IP Ranges] › ℹ  info      Fetching https://www.cloudflare.com/ips-v6
[app         ] [11/4/2024] [8:35:44 AM] [SSL      ] › ℹ  info      Let's Encrypt Renewal Timer initialized
[app         ] [11/4/2024] [8:35:44 AM] [SSL      ] › ℹ  info      Renewing SSL certs expiring within 30 days ...
[app         ] [11/4/2024] [8:35:44 AM] [IP Ranges] › ℹ  info      IP Ranges Renewal Timer initialized
[app         ] [11/4/2024] [8:35:44 AM] [Global   ] › ℹ  info      Backend PID 435 listening on port 3000 ...
[app         ] [11/4/2024] [8:35:44 AM] [SSL      ] › ℹ  info      Completed SSL cert renew process

NGINX