DocumentRoot is different for and

I have discovered where the issue is, but I am unsure how to use Virtualmin to fix/edit the problem.

What I experience: uses /home/mysite/public_html/ to pull up index.html uses /var/www/html/
My DNS is set up correctly.

In mysite.conf file under etc/apache2/sites-enabled/ is set up with a document root /home/mysite/public_html
(FWIW, 000-default.conf is also enabled in this folder)

When I type apache2ctl -S in the command line, however, the
MainDocumentRoot: “var/www/html”

I’m not very command line savvy, being a newbie, but I also want to use the Virtualmin web interface as much as possible. It has to be something simple, but I’ve looked everywhere and I’ve exhausted everything I’m capable of doing on my own.


This is a FAQ (really, it comes up every few days):

Quick answer:

Disable 000-default.conf. You can tell Virtualmin to make another site the “default”, but “default” doesn’t have a very useful meaning in a name-based virtual hosting system. (Sometimes, the first VirtualHost Apache finds is the “default”, which is why 000 is stuck on the front, but there are several ways for that to not occur, so don’t rely on that behavior if you can avoid it. Always use names.)

The other option, if you don’t want to disable 000-default.conf for some reason, is to make sure every VirtualHost section uses the same convention for IP:port. e.g., they either all need to be ip:port or *:port. They cannot be mixed or behavior will be confusing. There are rules for how Apache determines what to show, but nobody understands them. So don’t rely on them.