I want to set up a virtual hosting server on Linux/Apache2.2 that allows multiple users to set up multiple website domains as would be appropriate for commercial shared hosting.
I have seen examples (from my then perspective as a shared hosting customer) that allow users to store their web files in their user home directory with directories to correspond to the virtual host domain, e.g.:
/home/user1/www/example1.com
/home/user2/www/example2.com
instead of using /var/www
Questions:
How would you configure this in your Apache configuration files? (Don't worry about DNS)
Is this the best way to manage multiple virtual hosts? Are there others?
What safety or security issues do you think I should be aware of in doing this?
Many thanks, folks.
Edit: If you want to only answer question 1, please feel free, as that is the most urgent to me at this moment and I would consider that an answer to the question. I have done it for myself since posting, but I am not confident that it's the best solution and I would like to know how an experienced sysadmin would do it. Thanks.