Need help w/ Virtual Hosts Permissions and Ownership
I already have a directory structure I plan on using…
/srv/www/foo.com/{public,logs,private}
Now, can someone please help me out with setting up permissions, ownership and groupship (is that a word?) correctly?
Should I add my user to www-data? Is there a better way to do this?
3 Replies
I think the easiest solution is switching to the apache2-mpm-itk module, it was designed primarily for a multi-user/site host. However, it doesn't work for me because its based on the mpm-prefork module and I've gotten sucked into mpm-worker
of course I'd love to hear an answer from one of the more experienced server admins
I used the same directory structure as you except I have /home/username
I create a user/group for each domain and their home directory contains their public_html, logs, etc. Then I use suexec (which you have to compile yourself:
If you really don't want to bother with that much work, alternatively, you could just install virtualmin (a control panel like cpanel but free). They automatically do this sort of work for you..
I tried it, but I didn't like the added cpu/ram usage, but besides that it was pretty neat.