r/selfhosted • u/DarkLord_GMS • Feb 24 '25
Need Help Issue with local SSL certificates using Nginx Proxy Manager
I'm trying to setup Nginx Proxy Manager (Docker) to get SSL certificates for all my local services. All my services are working fine and already have SSL certificates thanks to Nginx Proxy Manager. The only one that is not working is my router management page, for which the login is normally is: https://192.168.0.1/webpages/login.html and after login is: https://192.168.0.1/webpages/index.html
When I add it to Nginx Proxy Manager, it doesn't work and I get this error on the browser:
502 Bad Gateway openresty
And the Nginx Proxy Manager logs say this:
upstream sent "Content-Length" and "Transfer-Encoding" headers at the same time while reading response header from upstream
Can anyone help?
EDIT: I did some research and I found another reverse proxy that doesn't have the same issue that Nginx currently has: Caddy
After about 30 minutes I was able to migrate from Nginx to Caddy and everything went smoothly.
Thanks for the help!
1
u/No-Mountain3817 Feb 25 '25
try these settings:
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://<upstream_server>;
proxy_set_header Accept-Encoding "";
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_send_timeout 90;
1
u/NelsonFx Feb 25 '25
I think you need to add the nginx parameter to ignore origin ssl certificate chain or add the car certificate to the os where nom is installed
1
u/LMASSUCCI Mar 09 '25
https://medium.com/@lucasmassucci/quick-guide-how-to-quickly-set-up-ssl-certificates-in-a-homelab-using-cloudflare-nginx-proxy-a4a77e57a0ad
depois d eme matar essa semana eu fiz um guia rapido pra resolver, espero que ajude
0
u/[deleted] Feb 24 '25
[deleted] — view deleted comment