Hello Drupal!
I've been working with Drupal for some time now and but I haven't used the multi site capabilities till now. Please guide me with the best approach towards this scenario:
- Multiple "brochure" sites (up to 10) - Each having it's own unique domain "greentomato.com", "redchilli.com" etc - Each site will have dual language English/Local - Each website should have a different look and feel - There has to be no links between each brochure (they cannot know of each other’s existence for sensitive reasons) – i.e. No links between the websites or admin module
I'm assuming this should be pretty simple to set up. I'm unsure about the "Total Isolation" clause though. Any pointers on best aproaches, trouble spots to avoid etc are hugely appreciated,
Thank you Alex
P.s Drupal 7!! Can we use it in production yet?
Things you list up is nothing specific to the multi-site. It's all just typical Drupal configuration, means if you can achieve that with normal Drupal instalation (no multi-site) then you can get the same result with multi-site.
Multi-site is just a way to use the same code for all sites you setup rather than having separate Drupal code for each site you setup. The advantage is when maintaining the code, ie for update you just update single source tree and all you sites now running with the latest code.
The way Drupal achieve this through a layer of settings file. By default, Drupal will look for settings.php in ./sites/default folder. But if you layout your sites folder something like:-
./sites/ ./sites/default/ ./sites/default/settings.php /sites/example1.com/ /sites/example1.com/settings.php /sites/example2.com/ /sites/example2.com/settings.php
then when you request for www.example1.com, Drupal will look inside /sites/example1.com/ folder for settings.php. But if you request let say www.anothersite.com Drupal will just look into /sites/default for settings.php since nothing is configured for that domain.
Everything pass this point is typical Drupal congfiguration.
Hi Kamal,
Thanks for the detailed reply. Like you said it's all just typical configuration, the only benefit is that admin can setup and manage 10 websites from one place. So setting up multi site is all about just setting up the sites/*<mydomain>/*settings.php .. pretty straight forward then.
What about isolating each web site from each other. What is the best way to ensure this?
Thanks :)
Alex
On Fri, Apr 23, 2010 at 5:12 AM, Mohd Kamal Bin Mustafa < kamal.mustafa@gmail.com> wrote:
Things you list up is nothing specific to the multi-site. It's all just typical Drupal configuration, means if you can achieve that with normal Drupal instalation (no multi-site) then you can get the same result with multi-site.
Multi-site is just a way to use the same code for all sites you setup rather than having separate Drupal code for each site you setup. The advantage is when maintaining the code, ie for update you just update single source tree and all you sites now running with the latest code.
The way Drupal achieve this through a layer of settings file. By default, Drupal will look for settings.php in ./sites/default folder. But if you layout your sites folder something like:-
./sites/ ./sites/default/ ./sites/default/settings.php /sites/example1.com/ /sites/example1.com/settings.php /sites/example2.com/ /sites/example2.com/settings.php
then when you request for www.example1.com, Drupal will look inside /sites/example1.com/ folder for settings.php. But if you request let say www.anothersite.com Drupal will just look into /sites/default for settings.php since nothing is configured for that domain.
Everything pass this point is typical Drupal congfiguration.
[ Drupal support list | http://lists.drupal.org/ ]
On Fri, Apr 23, 2010 at 11:36 AM, Alexander Arul
What about isolating each web site from each other. What is the best way to ensure this?
Not really sure about what you mean. In each settings.php file, you point it to different database, unless you want to use the same db so this is another issue you want to look on. But from what you said earlier, the site not dependent on each other so it already isolated - being in different database.
One issue that I always had problem with multi-site setup is the 'files' folder. Since you are using single Drupal source, it mean you only have one DocumentRoot for all sites. Now you should decide how user would access the static 'files'. One way you could create sub folder for each domain, something like:-
files/ files/example1.com/ files/example2.com/
Then user would access let say building.jpg through www.example1.com/files/example1.com/building.jpg
It's a bit weird but you have to somehow structure you file system for the static content to leave. Another cleaner approach is to create alias in your apache VirtualHost setting (provided you have access to it or your webhost provide some way to achieve that).
You can set in your VirtualHost something like:-
<VirtualHost *> ServerName www.example1.com DocumentRoot /home/user/www <Directory "/home/user/www"> Order allow,deny Allow from all </Directory>
Alias /files /home/user/static/example1.com </VirtualHost>
This way, static content can still be access through www.example1.com/files/building.jpg