f you are running more than one Drupal site, you can simplify management and upgrading of your sites by using the multi-site feature. Multi-site allows you to share a single Drupal installation (including core code, contributed modules, and themes) among several sites. Before we learn more about drupals multisite platform we draw your attention to the Domain Access module.
So when should you use the domain access module and when should you use the multisite platform? If multiple sites should share the same code, but have separate data you should use Drupal's multi-site configuration. If on the other hand multiple sites (or domains) should share the same code and the same data, though they may have different layouts and styles you should use Drupal with the Domain Access module. There is one important concern if you are on a shared host (see blow) and all sites share the same database, you may get problems if you move the sites to its unique domain (e.g. on a different server). You have to ask these question:The Domain Access project is a suite of modules that provide tools for running a group of affiliated sites from one Drupal installation and a single shared database. The module allows you to share users, content, and configurations across a group of sites such as:By default, these sites share all tables in your Drupal installation.
- example.com
- one.example.com
- two.example.com
- my.example.com
- thisexample.com <-- can use any domain string
- example.com:3000 <-- treats non-standard ports as unique
- Can I use the common database for each unique domain? I have not tested it, but assume you can.
- If yes, is that database minimalistic for that unique site?
- How easy is it to tune / tweak the database?
- If you are a competent SQL programmer, there should of course be no (minor) problems.
The multisite platform is particularly useful for managing the code since each upgrade only needs to be done once. Each site will have its own database and its own configuration settings, so each site will have its own content, settings, enabled modules, and enabled theme. However, the sites are sharing a code base and web document root, so there may be security concerns (see section below for more information).
Source: Run multiple sites from the same code base
See the Drupal coder blog for related information: Drupal 7 multisite improvement : multi-site directory aliasing
Then scroll down to the section: Multisite configuration
There you find most of the information you need.
In addition to the above article, the information needed to set up a multisite aliasing is written in the INSTALL.TXT file of the root folder. Note the following:
Note that all directories mentioned in this document are always relative to the directory of your Drupal installation, and commands are meant to be run from this directory (except for the initial commands that create that directory).
For additional information read the comment of the file: <Your Drupal 7-X installation>/sites/example.sites.php that starts as:
Code: Select all
/**
* @file
* Configuration file for Drupal's multi-site directory aliasing feature.
*
Note the README.txt file in <Your Drupal 7-X installation>/sites/all with the following content.It is best to create one database per site. Only when absolutely necessary should you install multiple Drupal sites into the same database instance. For example, if you are only allocated a single database instance for multiple sites, you can use Drupal's database prefix feature, which is documented online at http://drupal.org/documentation.
There are similar README.txt files int the <Your Drupal 7-X installation>/sites/all/modules and <Your Drupal 7-X installation>/sites/all/themes directory.This directory should be used to place downloaded and custom modules and themes which are common to all sites. Keeping contributed and custom modules and themes in the sites directory will aid in upgrading Drupal core files. Place contributed and custom modules and themes in the sites/all/modules and sites/all/themes directories respectively.
If your domains are add on domains on a main domain, you can get problems. First of all you should create this file:
checkhost.php
Code: Select all
<?php
print $_SERVER['HTTP_HOST'];
?>
newsymlink.php
Code: Select all
<?php
symlink(".", "addondomain.com");
//create as many symbolic links as you need here for all of your domains
print "Done";
?>
The resource requirements may be bigger for a multisite installation and may require loadbalancing http://en.wikipedia.org/wiki/Load_balan ... mputing%29 on multiple servers.
We end this post with a note on security.
If you host multiples sites on the same server in a multi-site environment, all your sites are at a risk if the shared code is hacked.Like the WordPress 3.+ multi site / user http://www.oopschool.com/phpBB3/viewtopic.php?f=18