Nginx not working with cloudflare
Hi, I have made all the configurations in the video that is there and I have configured the .conf of /home/container/nginx both the nginx.conf and in conf.d the default.conf, nginx_443.conf and nginx_80.conf files, but I am trying to enter with the dns web address and it says "Invalid SSL certificate Error code 526" (Cloudflare error), when I enter with the ip:port it works correctly.
Can you help me, please.
There are several ports that CloudFlare supports besides the standard 80 and 443. The list of supported ports can be found here: https://developers.cloudflare.com/fundamentals/reference/network-ports/ If you have a port that is different from what CloudFlare offers, then you will not be able to launch the site through CloudFlare.
If you have a non-standard port (80 and 443), then you will need to create a rule in CloudFlare to redirect to your port. To do this, go to manage your domain in CloudFlare. Open the "Rules" -> "Origin Rules" menu on the left. Create a new rule, specify any name, for example port. Enter your address, for example “https://example.com/*” and at the bottom select “Rewrite to”, indicate your port and at the end click “Deploy”. After this your domain should work.
But remember that the port can only be the one indicated in the list above. If something doesn’t work for you, check your nginx configuration, as well as your dns entries
Thanks for explaining, that is indeed how it works