The web server document root on my server is /var/www/html/
When I visited the primary ip address in my browser before Webmin/Virtualmin I was shown the web pages located in the above folder.
After Webmin/Virtualmin install and adding some domains(bother ip and name based) when I visit ths primary ip address I am taken to one of my name based web sites and not the web site at /var/www/html/
My server’s host name is set to www.xyz.com yet when I now visit www.xyz.com I am taken to that same name based site.
Is this behavior normal? Any idea of how to fix it?
If it is normal then what is now the web server document root? From what I can tell phpmyadmin is to be installed ot the document root but right now the document root is inaccessible.
Sorry for all the questions but it is hard to find answers. I’ve spent hours looking for stuff in this forum and via Google with not quite enough to get it done.
Yes. This is normal. Apache has two modes of operation, a single DocumentRoot, or a name-based VirtualHost configuration.
Asking how to “fix it” implies there is a problem…but there isn’t. Apache is behaving as documented.
The DocumentRoot is now configured for each VirtualHost definition. In a Virtualmin system, that defaults to "/home/domainname/public_html".
You can choose to have one of your virtual servers act as the “default” when you hit the IP of the system rather than a hostname (but this is pretty much useless, since hopefully you’ll never be handing out the IP address of your server to people you want to visit your sites)…just make it first in the list of VirtualHost definitions. Since this is such a useless activity, Webmin and Virtualmin don’t provide any GUI support for it. We’ve already got way too many options and features exposed in the UI, as it.
As I mentioned in your thread on phpmyadmin, if you want to use the one installed from the Debian repositories, you need to point some path on one (or more, if you want it to show up for all of your virtual servers) of your virtual hosts over to that directory. You can add a new Alias for that path to every VirtualHost section:
Alias /phpmyadmin /var/www/html/phpmyadmin
Or something along those lines…I’m not sure if suexec needs to be dealt with in this case. I kinda think not, since this Alias goes outside of the Directory where Suexec is setup.