Firstly, I'm wondering what is the best way to isolate Apache's vhosts from each other. I suppose this has something todo with the Linux filesystem as well, since it's not a good practise to have folders (and files) like /var/www/site1.com/public_html
and /var/www/site2.com/public_html
under the same Linux user/group.
I found this similar post: Isolating Apache virtualhosts from the rest of the system but noticed this is about isolating the vhosts from the system. A good practice but not what I ment.
I don't want any possible way that site1.com
can access files of site2.com
and if possible also nothing unnecessary from the filesystem other than it's own directory and sub directories.
Secondly, what is the influence of chmod on the userrights. Let's say both sites run in their own user and usergroup. But site1.com
has one file or directory with the chmod rights 777. Will site2.com
be able to use that file/directory?