What is the difference between /home/virtualserver-account/website, and /var/www/clients/client/website?

8 posts / 0 new
Last post
#1 Sat, 10/14/2017 - 21:47
adamjedgar

What is the difference between /home/virtualserver-account/website, and /var/www/clients/client/website?

As the question states...

What is the difference between setting up a web hosting server with many client accounts and websites on it, using either of the following methods:

  1. /home/virtualserver-account/website (e.g. Virtualmin, and Vestacp)

  2. /var/www/clients/client/website? (e.g. ISPConfig)

I read the following ask ubuntu forum post about it...however that didnt really help at all as it seemed to go either way??? https://askubuntu.com/questions/219615/var-www-vs-home-user-public-html

Why do some control panels use option 1, and others option 2? What are the advantages and disadvantages of each method?

Sun, 10/15/2017 - 00:38
Joe
Joe's picture

Some control panels are wrong. Others (Virtualmin, especially) are right. ;-)

Really, it's not a hugely technical difference. There are some advantages to either choice, but my philosophy on it is that I wanted Virtualmin to adhere closely to what UNIX/Linux users are accustomed to and what tradition and documentation would cover. /home is where users live, Virtualmin domain account owners are users, so they live in /home.

The one negative is that on some distributions we have to rebuild httpd suexec to allow operation in /home rather than /var/www. (But, there is a similar negative for anyone wanting to use SELinux and a variety of other tools that have expectations about where users live and where users are allowed to do things.)

But, it's probably overthinking it to spend too much time worrying about it. The differences are mostly in things we do without you noticing, rather than in things you need to think about. It could have gone either way, and I made the call (~14 years ago) that we would live in /home, based on our philosophy of "do not mess with people's expectations and don't fiddle with their system". So, we use standard packages (when possible), standard config files (when possible), standard paths (when possible), and standard package management (when possible). All around, we really want a system with Virtualmin to look first like the OS it is installed on and only secondarily like a "Virtualmin system". We want someone reading docs for their OS to recognize everything on the system because it's all in the same places and uses the same conventions.

So: /home is where users have always lived. That's where users live on a Virtualmin system. Others may take the position that /var/www is where websites live, but they're wrong, as user websites have also always lived in /home.

--

Check out the forum guidelines!

Sun, 10/15/2017 - 07:07
adamjedgar

I think, upon reflecting on your answer, you will have seen my next question coming a mile away...so why did you then decide to call them virtualmin virtual servers instead of user accounts? (You dont have to re-answer this one...i am just being cheeky)

I appreciate your above answer and it honestly does help lubricate the gearbox gears spinning in my head. Thanks.

Oh a quick edit...

Why on a first install does the default server have a directory /var/www with an index.html in it?

If we are using /user wouldnt it be an idea for /var/www to not exist?

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Sun, 10/15/2017 - 14:55 (Reply to #3)
Joe
Joe's picture

I dunno why we don't call them accounts. We probably should. At the time "virtual server" seemed reasonable, but it seems less reasonable today. We never wanted to call them "domains" and don't even today, because it conflates two different concepts and seems bound to cause confusion. But, our current terminology also causes confusion. It's likely that in the Virtualmin 7 development cycle there will be a change on this front...possibly a dramatic one.

"Why on a first install does the default server have a directory /var/www with an index.html in it?"

That comes from the web server packages and not anything we do. The installer is supposed to always disable that website. If it doesn't, it's a bug. It wasn't being disabled on some distros early on, but I think for the past couple of weeks it is correctly disabled everywhere. Is that not your experience?

/var/www existing doesn't really hurt anything, and it is part of the web server packages...if we removed it, we'd have to delete it again after every web server package upgrade (and though we provide the httpd packages on CentOS, we don't alter them except to set suexec_docroot to /home). Messing with stuff like that is not the kind of thing we do unless we absolutely have to. We try really hard to leave everything alone except what we need to provide a good experience.

--

Check out the forum guidelines!

Mon, 10/16/2017 - 15:24
adamjedgar

Its just surprising that an index.html is automatically placed in /var/www directory but not in /home/user.

In order to get index.html in /home/user by default i have to manually add index.html in /etc/skel.

Your mention of changes in v7...it would be good if there was a simple interface monitor added to system information screen that displayed a short list of top "resource hogs" currently running

I suspect something i have added recently is slowing down my website page load times and am not sure if its just my internet connection or if its the server (accessing from mobile tablet is still slower than a few days ago)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Mon, 10/16/2017 - 18:20 (Reply to #5)
Joe
Joe's picture

I've considered adding a default index.html. (And we used to actually include a Virtualmin branded one in the httpd packages way back many years ago, but my desire to not take over the system won out and we reverted to the stock packages).

But, I could see dropping a default index.html into /etc/skel during installation as a useful thing. I'll add it to my todo list. Not sure when I'll be able to tackle it (though it shouldn't take more than an hour or two, to add it to virtualmin-config and roll out new packages).

--

Check out the forum guidelines!

Mon, 10/16/2017 - 18:38 (Reply to #6)
adamjedgar

Thanks joe.

The default index.html is a pretty minor thing really...i would rather that the html 5 interface was reorganised in a more logical way. Having said that, virtualmin is so feature rich, full of options, exactly what should go where is beyond my visualisation at present.

Perhaps a new forum could be started specifically for interface organisation and layout? (Im putting baby to sleep and typing on my phone right now...i havent looked to see if there is already one...apologies if there is ^_^)

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Thu, 08/09/2018 - 01:26
lucyjohn987

Thanks for sharing

Topic locked