ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersโ€ข2y agoโ€ข
8 replies
itaquito

Cloudflare Tunnel with virtual hosts

Hello! I just setup a Cloudflare Tunnel behind a CGNAT. To test, I made a public hostname and now I can see the default page of Nginx, so it works! Woo!

In this same machine I have some virtual hosts made,
phpmyadmin.debian.example.com
phpmyadmin.debian.example.com
and
pterodactyl.debian.example.com
pterodactyl.debian.example.com
. I have the DNS records of these subdomains pointed to the local IP of the machine. Everything works as expected, I can access both of the apps without any issue in my local network.

Next I tried adding these applications to my tunnel. I created a new public hostname
phpmyadmindebian.example.com
phpmyadmindebian.example.com
and added this same hostname to my Nginx site configuration. However, I only see the default page of Nginx in this new public hostname.

Does Cloudflare tunnel doesn't work with virtual hosts? Is there any extra configuration I need to do?

Thanks for your help
Solution
If I put the local ip of the machine (
http://192.168.100.90
http://192.168.100.90
), rather than
localhost
localhost
in the service URL, it works!
Jump to solution
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Cloudflare Tunnel
Cloudflare DevelopersCDCloudflare Developers / general-help
12mo ago
cloudflare tunnel
Cloudflare DevelopersCDCloudflare Developers / general-help
12mo ago
Cloudflare with Apache virtual host
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago
Help required with cloudflare tunnel!
Cloudflare DevelopersCDCloudflare Developers / general-help
2y ago