Home > other >  SSL certificate not working on Nginx Proxy Manager (Cloudflare DNS)
SSL certificate not working on Nginx Proxy Manager (Cloudflare DNS)

Time:11-12

I set up a Cloudflare account and redirected my domain to its nameservers. During setup I left all the settings at default.

I added two DNS records: https://img.codepudding.com/202111/22ab059fe4e542ac9c06e4894ed8f01d.png

An "A" record targetting my IP address and a "CNAME" record creating an alias for it.

In my Nginx Proxy Manager (running in Docker on a bridged network connected with a database), there is only one proxy host directing the "CNAME" alias to a LAN IP (https://192.168.0.50:9443; Portainer operates on HTTPS).

Everything works flawlessly until I decide to add an SSL certificate. The only option I tick is "Force SSL". When I try to access the site at this point, it loads for a bit and then times-out to the "522" error. The only way I can get the site to work is to clear the Nginx volumes and restart the stack.

Turning Cloudflare proxy off doesn't seem to make any difference. Neither does trying to access different docker containers operating on HTTP

CodePudding user response:

I managed to solve the problem. I didn't forward port "443" on my router to the target device... I hope that this helps anyone else who made this mistake.

  • Related