phpdrupaldrupal-6drupal-modules

Serving multiple site with one drupal (not using multi site)


I am looking for expert advice on how to best serve multiple sites with one Drupal instance (using Pressflow 6.x). Let's consider the company needing this is called "ABC Group of Companies" and it has 3 sister concerns. So, altogether there will be four sites:

  1. www.abcgroup.com
  2. www.company-a.com
  3. www.company-b.com
  4. www.company-c.com

Here are the things that are most interesting:

Now, I am thinking of having DNS entry so each of the domain point to the same Drupal installation and when Drupal gets bootstrapped, I would like to sniff into the $_SERVER array to know which site is being hit. I'd then like to load the theme accordingly, show the contents specific to that site, and also show the contents that are shared with all the sites.

To make this happen, so far I have created a node type called "Site" and have created four contents for each of the sites. Then for each other content type (say, Page) I have put a node reference to the "Site" content type with multiple value so when creating a new content, the administrator can specify in which site that content will be showed. However, after that I am stuck.

I have tried to understand Contexts, Spaces, PURL - but haven't figured them out fully yet. What do you think is the best approach to handle this scenario ?


Solution

  • The way you are suggesting is certainly a way that you could do it, but have you considered domain access? I have used it in the past and found it to be very useful. there is also quite a large collection of modules which work with it. Different themes, Options as to which nodes should appear on which sites and shared users are all features that it has.

    Hope this helps!

    http://drupal.org/project/domain