I have configured Cloudflare Tunnel on my Unraid server. The config yaml file has the ingress with internal ip:
- hostname: “*.your1stdomain.com”
#You can also do a catch all rule to send everything to NPM/nginx, I prefer the above though
- service: https://REVERSEPROXYIP:PORT
#Last rule responds to any HTTP traffic with a 404 disable when getting new SSL Certs via NPM
#Enables this only for getting new SSL Certs via NPM
- service: http://REVERSEPROXYIP:PORT
The reverseproxyip is the internal ip of my Nginx Proxy Manager container. I had to upload origin certificate from Cloudflare in it in order to make it work - I cannot issue let’s encrypt certificates, don’t know why but this is not the case of my question.
So I am successfully forwarding subdomains to different app containers and they are accessable on the internet. I have installed a Ubuntu 20.04 vm with OpenLiteSpeed and Cyberpanel VM. I want to host websites there. How can I use the same tunnel to make the websites accessable on the internet? If I use subodmain cname record in Cloudflare and host that subdomain in the cyberpanel, will it work? Or should I forward ports from NPM to the internal VM ip? I am confused how to make this work.