Fresh install, all domains show /var/www/html/index.html instead of ~/public_html/index.html

Ubuntu Server 20.04 Virtual Machine with IP on XCP-NG

Network Configuration:
Home Network with Public Static IPv4, Modem/Router is configured to use as DMZ Host (All Ports are forwarded to a Specific IP, exposing it to the Internet

Hostname: which can be accessed in other networks as well. has ns1, ns2 records

Problem Description:
All domains use /var/www/html/index.html instead of /home/user/public_html

What process I have done:
1.fresh installed Ubuntu Server 20.04
2. sudo update, upgrade
3. Installed virtual min from the Public available script
4. Virtual min asked for FQDN entered
5. Visited for post install
6. Before doing post install, changed shared IP address in System Settings > VirtualMin configuration > Networking from to
7. Ran post install wizard. Let’s Encrypt certificates were successfully generated as well as, DNS Records, virtual server.


  1. After that, no matter which website I visit which is hosted on Virtual Min, the Apache 2 Linux Ubuntu webpage is rendered.

  2. If I try to visit https// my browser shows an SSL Error Message. However if I visit I can visit Virtual Min with a valid SSL certificate

Any suggestions?


You did not need to change the “Shared IP Address” for your setup. Virtualmin is smart enough when it’s appropriate to make use of your “Public IP Address”. However technically on your server, your “Private IP Address” should be used in order to resolve websites to the appropriate Virtual Server.

Fix that, and you likely will have your problem resolved.

1 Like

Is an address on the Virtualmin system? This change can’t possibly work if it is not.

The DNS records need the public IP. The virtual hosts need the address on the server itself.

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