Forum Moderators: phranque
/var/www/html/
where the actual website files are in the html directory
and files that need to be above the root may be in other directories such as
/var/www/_inc_files_above_root/
however is there a convention for hosting multiple websites?
would it be:
/var/www/website1/
/var/www/website2/
/var/www/website3/
etc.
or perhaps
/var/www/html/web1/
/var/www/html/web2/
/var/www/html/web3/
etc
i have full server access, i'm just wondering if there is anormal/conventional way of doing this?
Think about the sites. Are you going to have subdomains for any of the sites? A test or dev subdomain?
Think about the folders. Will their placement in any particular place expose the files there as if they were a folder within a different domain to the one intended? If so, you'll need conditional redirects to stop the additional URLs being indexed.
1. there will be about 20+ domains, 2 or 3 will have subdomains.
2. 90% of domains are me, 2 are historic clients who will move with me.
3. i'm also going to have a test domain (which i will use a special domain name for - this will be blocked at the firewall giving access from only certain ip address/es - basically mine.)
4. i'm thinking that some domains may share common 'include files' ,i'm assuming makes it sense to have these above the root/s.
5. i've got a decent allocation of ip addresses to spread among my websites.
6. i'm going to keep one 'website/domain' on a unique ip for use as admin, this ip will be blocked at the firewall except for given ip addresses - basically only mine (i have a static ip) - my custom made admin area allows me to edit/update all the websites [just basic database updates]
anything else that one should think about in this situation.
i hope/plan for a growth in domains on the server and would like new ones to be easily incorporated into the file system.
nearly all domains will have the same apache directives. so how would i make them 'inherit' the same rules.
but it is the directory structure i'd like to get set up in a sensible forward thinking way.
any thoughts?