From 90ef06dcd16634b5510205c6d638aef52bd138dc Mon Sep 17 00:00:00 2001 From: Jennifer Hodgdon <yahgrp@poplarware.com> Date: Tue, 4 Feb 2014 11:20:11 -0800 Subject: [PATCH] Issue #2168617 by clemens.tolboom: Fix up docs on how to do multisite --- core/INSTALL.txt | 16 ++++++++++++---- sites/default/default.settings.php | 9 ++++----- sites/example.sites.php | 18 +++++++++--------- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/core/INSTALL.txt b/core/INSTALL.txt index f5f5c3a8f9dc..e9430d438220 100644 --- a/core/INSTALL.txt +++ b/core/INSTALL.txt @@ -328,13 +328,21 @@ MULTISITE CONFIGURATION A single Drupal installation can host several Drupal-powered sites, each with its own individual configuration. +For this to work you need the file sites/sites.php to exist. Make a copy of +the example.sites.php file: + + $ cp sites/example.sites.php sites/sites.php + 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/). +copy file 'default.settings.php' from the 'sites/default' directory into the +new site directory with file name 'settings.php' and modify 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/). + + $ cp sites/default/defaults.settings.php sites/example.com/settings.php 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 diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php index 66ae87bbe78f..5f3b4943d2a2 100644 --- a/sites/default/default.settings.php +++ b/sites/default/default.settings.php @@ -10,11 +10,10 @@ * your modifications. Failure to remove write permissions to this file is a * security risk. * - * The configuration file to be loaded is based upon the rules below. However - * if the multisite aliasing file named sites/sites.php is present, it will be - * loaded, and the aliases in the array $sites will override the default - * directory rules below. See sites/example.sites.php for more information about - * aliases. + * In order to use the selection rules below the multisite aliasing file named + * sites/sites.php must be present. Its optional settings will be loaded, and + * the aliases in the array $sites will override the default directory rules + * below. See sites/example.sites.php for more information about aliases. * * The configuration directory will be discovered by stripping the website's * hostname from left to right and pathname from right to left. The first diff --git a/sites/example.sites.php b/sites/example.sites.php index 2b00151d7336..2a813dd4fb17 100644 --- a/sites/example.sites.php +++ b/sites/example.sites.php @@ -2,22 +2,22 @@ /** * @file - * Configuration file for Drupal's multi-site directory aliasing feature. + * Configuration file for multi-site support and directory aliasing feature. * - * This file allows you to define a set of aliases that map hostnames, ports, and - * pathnames to configuration directories in the sites directory. These aliases - * are loaded prior to scanning for directories, and they are exempt from the - * normal discovery rules. See default.settings.php to view how Drupal discovers - * the configuration directory when no alias is found. + * This file is required for multi-site support and also allows you to define a + * set of aliases that map hostnames, ports, and pathnames to configuration + * directories in the sites directory. These aliases are loaded prior to + * scanning for directories, and they are exempt from the normal discovery + * rules. See default.settings.php to view how Drupal discovers the + * configuration directory when no alias is found. * * Aliases are useful on development servers, where the domain name may not be * the same as the domain of the live server. Since Drupal stores file paths in * the database (files, system table, etc.) this will ensure the paths are * correct when the site is deployed to a live server. * - * To use this file, copy and rename it such that its path plus filename is - * 'sites/sites.php'. If you don't need to use multi-site directory aliasing, - * then you can safely ignore this file, and Drupal will ignore it too. + * To activate this feature, copy and rename it such that its path plus + * filename is 'sites/sites.php'. * * Aliases are defined in an associative array named $sites. The array is * written in the format: '<port>.<domain>.<path>' => 'directory'. As an -- GitLab