How do configure a subdomain Cloudflare Zero Trust / Apache
I can use a subdomain as long as I use different local IP addresses. That works to expose different parts of a home lab to the internet which is nice, but it is not what I am trying to do. I am hosting various test projects on one certain local IP address.
I can buy new domain names and use many different domains for each project with my one specific local IP and each website loads up fine.
But how do I properly set it up to make a subdomain work?
Here is the entry I have to add to one of the files on windows.
Here is a line I am supposed to add to the other file on windows.
My local directory is setup as follows:
Do I need to make it:
??
...
I am attaching a photo of my Cloudflare Zero Trust Tunnel control panel.
It has to be something extremely simple that I am overlooking because why can I host five plus completely different websites off of one instance of apache running on one local IP and not do it with subdomains?
Thank you very much in advance for your help!
3 Replies
i strongly suggest you to stop
you're trying to host a public facing website with xampp?
that's pure insanity!
if you want to host your php website for free, you can try https://www.infinityfree.com/
i used it for another project, and it has an 85% uptime
if you can pay for it, you should look for better hosting
I have some hosting, but it is not simply click save on my text editor and my changes are live. I have to login and update the files each time. I reserve paid hosting for my absolute final products.
I am not marketing these websites to the masses. It is mainly for small projects. I do not have port 80 exposed any longer. It is all through the Zero Trust Tunnel.
I will save that link because I am sure I will do some projects on that too.
I already had plans to migrate away from xampp and use an app or some dedicated vm on TrueNas Scale on an isolated network. I am just not done setting it all up yet.
I still want to setup my sub domains to work on my current setup if only for educational purposes.
Even when I migrate some projects to paid domain hosting, I still need to know how to configure multiple subdomains in cloudflare on the same ip.
if you dont want to upload your stuff manually, you can use github/gitlab to deploy for you
in fact, you can have your own personal instance of gitlab that runs your personal instance of runners that syncs everything to the servers with ftp/ssh
configuring subdomains like that manually is always a pain
just install an admin panel like ispconfig, and use it locally
xampp is configured to work well with 1 website, but you can push it to work well with subdomains