- Настройка мультисайтинга
- Одна регистрация для всех сайтов
- Обновление модулей при мультисайтинга
- Удаление мультисайтинга (Расцепление мультисайтовой связки)
Варианты мультисайтинга
- Отдельная база данных для каждого сайта
- Одна база данных, но разные префиксы таблиц у каждого сайта
- Общие (shared) таблицы у разных сайтов. Общими могут быть:
- пользователи
- контент
- пользователи и контент
Многосайтовая конфигурация

A single Drupal installation can host several Drupal-powered sites, each with
its own individual configuration.
Additional site configurations are created in subdirectories within the 'sites'
directory. Each subdirectory must have a 'settings.php' file which specifies the
configuration settings. The easiest way to create additional sites is to copy
the 'default' directory and modify the 'settings.php' file as appropriate. The
new directory name is constructed from the site's URL. The configuration for
www.example.com could be in 'sites/example.com/settings.php' (note that 'www.'
should be omitted if users can access your site at http://example.com/).
Sites do not have to have a different domain. You can also use subdomains and
subdirectories for Drupal sites. For example, example.com, sub.example.com,
and sub.example.com/site3 can all be defined as independent Drupal sites. The
setup for a configuration such as this would look like the following:
- sites/default/settings.php
- sites/example.com/settings.php
- sites/sub.example.com/settings.php
- sites/sub.example.com.site3/settings.php
When searching for a site configuration (for example www.sub.example.com/site3),
Drupal will search for configuration files in the following order, using the
first configuration it finds:
- sites/www.sub.example.com.site3/settings.php
- sites/sub.example.com.site3/settings.php
- sites/example.com.site3/settings.php
- sites/www.sub.example.com/settings.php
- sites/sub.example.com/settings.php
- sites/example.com/settings.php
- sites/default/settings.php
If you are installing on a non-standard port, the port number is treated as the
deepest subdomain. For example: http://www.example.com:8080/ could be loaded
from sites/8080.www.example.com/. The port number will be removed according to
the pattern above if no port-specific configuration is found, just like a real
subdomain.
Each site configuration can have its own site-specific modules and themes in
addition to those installed in the standard 'modules'and 'themes' directories.
To use site-specific modules or themes, simply create a 'modules' or 'themes'
directory within the site configuration directory. For example, if
sub.example.com has a custom theme and a custom module that should not be
accessible to other sites, the setup would look like this:
- sites/sub.example.com/:
- settings.php
- themes/custom_theme
- modules/custom_module
Полезные рецепты по этой теме
Использованные материалы
- Файл INSTALL.txt из стандартной поставки Drupal
Полезные ссылки
Drupal handbook at drupal.org.










