After creating a new Virtual Server, the website doesn't show contents of public_html, rather it shows var/www/html which I don't want

I don’t recall ever installing anything via apt. Maybe composer, but that’s pretty much it (if even).

I should probably also mention that I’m using Cloudflared as a tunnel to my computer that’s running Virtualmin. But that shouldn’t matter since I AM getting a response, though it is the default Ubuntu apache2 page, and not whatever’s in public_html.

I deleted my Virtual Server and created a new one, this time with mydomain.com (instead of website.mydomain.com), and the problem still persists… It’s still showing the Ubuntu default page.

You should really lead with that. If you’re proxying or using any Cloudflare services, you really need to mention it. It makes a difference in how things need to be configured.

I assume “tunneling” means you have an agent (some kind of VPN) hooking localhost to a public Cloudflare IP? That means your VirtualHosts need to be on that local IP or use *.

So, read that troubleshooting entry I sent above, with the new awareness that the IP that is configured in Virtualmin is probably wrong for Cloudflare tunneled connections. You need to set it to localhost or * (if using *, you need to make sure you don’t have any non-* VirtualHost configured options, and you need to make sure you haven’t explicitly configured Apache to only listen on a specific IP that is something other than localhost).

It worked!

I went to System Settings → Virtualmin Configuration → Networking Settings → Default virtual server IPv4 address from “From network interface” to “*” and it worked!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.