3 days of Googling and reading "Drupal7 Multi-site configuration" book by Matt Butcher has left me confused as to how to create a multi-site where the "sub" sites are in sub-directories.
Any guidance on what I am doing wrong here would be greatly appreciated!
TEST SITE: http://mcneardesign.com/multi7
Hosting Environment: hostgator | shared hosting
>Using multi-site to allow for unique settings and combinations of installed modules.
>"Sub-sites" will all be small, and so could share a single database.
Assumptions:
>sites in sub directories would not require any kind of registration with host (vs unique URLs or sub-domains)
>sites in sub domains would not require setting of symlinks no need to create php generated symlinks as discussed here:
http://perishablepress.com/use-php-to-create-symbolic-links-without-shel...
Process:
=> copy: sites/example.sites.php
=> rename as: sites/sites.php (leaving it directly under the root of the sites folder)
=> populate domain array in sites.php
=> example:
$sites = array(
'http://mcneardesign.com/multi7/menu' => 'menu','http://mcneardesign.com/multi7/cater' => 'cater','http://mcneardesign.com/multi7/ship' => 'ship',
);
=> create folders for individual sites within sites folder
naming convention for sub-directory directory (in "sites" directory):
mcneardesign.com.multi7.cater
(should point to: http://mcneardesign.com/multi7/cater)
=> each folder should contain 3 sub folders: files | modules | themes
=> each folder should contain a copy of the root files: .htaccess | robots.txt
=> each folder should contain a unique settings.php file specifying a unique database prefix
=> database prefix should be unique in each settings.php file (lines 212-227)
Comments
Sudomains possibly complicating things
For a start in my experience you can leave the example.sites.php behind, if everything is pointing in the right direction drupal will find that you are using a multi-site setup by itself. I would suggest leaving that because it only complicates things.
I think what is going wrong is the fact that you are using sub-domains if you have the possibility to work of the main domain and use a different domain to point at it you can test if that will work.
For clarification of the file structure.
When your main site = mcneardesign.com
and you want to run 2 other domains from the same setup. lets say: example1.comand example2.com
you place 2 folders with the names example1.com and example2.com inside sites
The modules and themes folders are not required unless you want to give each site modules and a theme that wont be shared with the other sites. And I think that is kind of the whole point of a multisite setup.
If you have DirectAdmin or a similar control panel on you shared host. You need to point a domain (example1.com) to the main domain(mcneardesign.com). Drupal will find the example1.com subfolder and do it's work.
I have not tried used multi-site setups with subdomains so I can't say to much about that, I think you are overcomplicating it that way.
Good luck!