Where to put web content?

Quite a silly newby question:

I am still in “play mode” with my new VPS. I installed Webmin and Virtualmin (great tools!) and I created a virtual website, let’s call it “me.com”. So far everything is fine. But…

Where to put web content?

I thought all HTML etc. goes to /var/www/html/me.com/

But seems virtualmin only creates something in /home/ - which I also can’t access from the web for now since I can see only whats behind /var/www/html/ when I type in my IP.

Do I just go on an FTP everything to /var/www/html/me.com/ - or how do I go from here?

Just another question: I like your mysql support and it works perfect for me - do I still need phpmyadmin ? Seems webmin can do what I need.


There’s some programs associated with Virtualmin that are going to work best running out of /home (suexec support, primarily).

If you can, it might be helpful to point a domain at your box, add that as a Virtual Server, and test using the domain.

If you don’t have one available yet – one way around that is to change the primary Virtual Host. You’re seeing the content in /var/www when you access your server because that’s where the default Virtual Host points.

But, if you change the default Virtual Host to another Virtual Server you’ve created, that’s what’ll show up when you browse to your machine by IP.

The default Virtual Host is simply the first “VirtualHost” section that shows up in /etc/httpd/conf/httpd.conf. So create a Virtual Server, then make sure it shows up before all the others, and restart Apache when you’re done (/etc/init.d/httpd restart).

At that point, you can upload your content to /home/$USER/public_html.

Regarding phpMyAdmin – nope, you don’t need that all, it’s simply that some people prefer one tool over another. If you’re fine with what Virtualmin provides, great! And you can always install phpMyAdmin later.

ok, that’s 100% clear. I will stick to /home/…

So how about subdomains?

right now I have a mydomain.com/projects (in that directory) which I like to change to: projects.mydomain.com

Let me guess: /home/$user-mydomain/projects

Is there a FAQ for subdomains?

So how about subdomains?

A subdomain is just a name. There is, actually, a FAQ about "sub-domains" and other confusions that folks accustomed to cPanel often have with Virtualmin:


The important thing to understand is that to Virtualmin a “subdomain” and a “domain” are irrelevant. They’re just names, and if you create a virtual server named sub.domain.tld, it will be just like any other virtual server, i.e., it will live in:


If, on the other hand, you wanted sub.domain.tld to be "owned" and managed by a virtual server account named "domain.tld", you would make it a sub-server rather than a virtual server.

Let me guess: /home/$user-mydomain/projects

No. You’re thinking in cPanel terms, and we think cPanel is really dumb, in this regard. (We used to support this kind of silliness, but we got over it, and now we disable the sub-domain account type, by default, and we strongly discourage people from using it, as it will be going away entirely in the future. It was our single worst “feature” ever.)

So, if you have mydomain.com/projects, and you want to turn it into projects.mydomain.com, then you would either create a new virtual server (if "projects" is to be managed by someone different than mydomain) or a sub-server within mydomain (if "projects" will be managed by the same person).

Names mean nothing in Virtualmin–don’t even think about “subdomains” and “domains”, except in terms of naming things. They have no bearing on behavior in Virtualmin. There is no need to special case subdomains, and it just serves to confuse people.

Sub-servers (virtual servers that are owned by an existing virtual server account) live in the domains subdirectory, and they have a full tree, just like a virtual server (because, if you allow it, they can have all of the same features as a virtual server–including mail, scripts, etc.).

So web content for projects would be in:


A little long, I guess, but it’s very predictable, and you know that everything relating to a particular virtual server (including its sub-servers and related content) all lives in one place.

And, just in case you’re thinking it: joe.projects.mydomain.com would not be a “sub-sub-server”. It would be either a virtual server (if “joe” were going to manage it, rather than “mydomain”) or a sub-server (if “mydomain” is still going to manage it). I mention this to make it very clear that names do not matter to Virtualmin, whether they are subdomains, subsubdomains, or subsubsubsubsubdomains. They’re all names, and Virtualmin treats them exactly the same. Your only decision to make when creating a domain is who is going to “own” it: a new account (virtual server), or an existing account (sub-server).