: How to organize /var/www/ for multiple users and vhosts in apache I've been creating new directories for each site in the var folder like this: /var/www -- localhost -- owned by localuser:www-data
I've been creating new directories for each site in the var folder like this:
/var/www -- localhost -- owned by localuser:www-data (+setuid/setguid)
/var/www-somesite -- somesite.com, somesiteuser:somesitegroup (+setuid/setguid)
/var/www-anothersite -- anothersite.org, anothersiteuser:anothersitegroup (+setuid/setguid)
A virtual host points is associated to each of these directories.
The apache user www-data is a member of somesitegroup and anothersitegroup
Is there a better practice I should be following for this?
More posts by @Yeniel560
1 Comments
Sorted by latest first Latest Oldest Best
If you have multiple users with different websites on your server, it's commonplace to place the user's website in a directory within their home folder and use the Apache
configuration to point the relevant domain name at the appropriate directory.
/home/somesiteuser/public_html
/home/anothersiteuser/public_html
...etc...
The has the added benefit of allowing for ease of limiting user disk quota and removing their files when you remove the user. It also keeps your default web root clean and makes it easier to run your default website out of /var/www.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.