summaryrefslogtreecommitdiff
path: root/sites
diff options
context:
space:
mode:
authorJennifer Hodgdon <yahgrp@poplarware.com>2012-08-24 11:15:37 -0700
committerJennifer Hodgdon <yahgrp@poplarware.com>2012-08-24 11:15:37 -0700
commit7043f6d7abf3b3f94341bda58ca17a447167fb17 (patch)
treed3a839099bd19dbe9ba0606f005f7439244fad44 /sites
parenta3da039c49184663b63fd5d99dddc3cda9bd9cd4 (diff)
downloadbrdo-7043f6d7abf3b3f94341bda58ca17a447167fb17.tar.gz
brdo-7043f6d7abf3b3f94341bda58ca17a447167fb17.tar.bz2
Issue #1018324 by Albert Volkman, webbykat, disasm, jhr, jorap: Fix up documentation for multisite
Diffstat (limited to 'sites')
-rw-r--r--sites/default/default.settings.php40
-rw-r--r--sites/example.sites.php70
2 files changed, 66 insertions, 44 deletions
diff --git a/sites/default/default.settings.php b/sites/default/default.settings.php
index 30699a0a2..0ae34a2bb 100644
--- a/sites/default/default.settings.php
+++ b/sites/default/default.settings.php
@@ -5,41 +5,51 @@
* Drupal site-specific configuration file.
*
* IMPORTANT NOTE:
- * This file may have been set to read-only by the Drupal installation
- * program. If you make changes to this file, be sure to protect it again
- * after making 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.
- *
- * The configuration directory will be discovered by stripping the
- * website's hostname from left to right and pathname from right to
- * left. The first configuration file found will be used and any
- * others will be ignored. If no other configuration file is found
- * then the default configuration file at 'sites/default' will be used.
+ * This file may have been set to read-only by the Drupal installation program.
+ * If you make changes to this file, be sure to protect it again after making
+ * 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.
+ *
+ * The configuration directory will be discovered by stripping the website's
+ * hostname from left to right and pathname from right to left. The first
+ * configuration file found will be used and any others will be ignored. If no
+ * other configuration file is found then the default configuration file at
+ * 'sites/default' will be used.
*
* For example, for a fictitious site installed at
- * http://www.drupal.org/mysite/test/, the 'settings.php'
- * is searched in the following directories:
+ * http://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched
+ * for in the following directories:
*
+ * - sites/8080.www.drupal.org.mysite.test
* - sites/www.drupal.org.mysite.test
* - sites/drupal.org.mysite.test
* - sites/org.mysite.test
*
+ * - sites/8080.www.drupal.org.mysite
* - sites/www.drupal.org.mysite
* - sites/drupal.org.mysite
* - sites/org.mysite
*
+ * - sites/8080.www.drupal.org
* - sites/www.drupal.org
* - sites/drupal.org
* - sites/org
*
* - sites/default
*
- * If you are installing on a non-standard port number, prefix the
+ * Note that if you are installing on a non-standard port number, prefix the
* hostname with that number. For example,
* http://www.drupal.org:8080/mysite/test/ could be loaded from
* sites/8080.www.drupal.org.mysite.test/.
+ *
+ * @see example.sites.php
+ * @see conf_path()
*/
/**
diff --git a/sites/example.sites.php b/sites/example.sites.php
index 08c1020ff..2b00151d7 100644
--- a/sites/example.sites.php
+++ b/sites/example.sites.php
@@ -4,40 +4,52 @@
* @file
* Configuration file for Drupal's multi-site directory aliasing feature.
*
- * Drupal searches for an appropriate configuration directory based on the
- * website's hostname and pathname. A detailed description of the rules for
- * discovering the configuration directory can be found in the comment
- * documentation in 'sites/default/default.settings.php'.
+ * 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 allows you to define a set of aliases that map hostnames and
- * pathnames to configuration directories. These aliases are loaded prior to
- * scanning for directories, and they are exempt from the normal discovery
- * rules. The aliases are defined in an associative array named $sites, which
- * should look similar to the following:
+ * 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.
+ *
+ * Aliases are defined in an associative array named $sites. The array is
+ * written in the format: '<port>.<domain>.<path>' => 'directory'. As an
+ * example, to map http://www.drupal.org:8080/mysite/test to the configuration
+ * directory sites/example.com, the array should be defined as:
+ * @code
* $sites = array(
- * 'devexample.com' => 'example.com',
- * 'localhost.example' => 'example.com',
+ * '8080.www.drupal.org.mysite.test' => 'example.com',
* );
+ * @endcode
+ * The URL, http://www.drupal.org:8080/mysite/test/, could be a symbolic link or
+ * an Apache Alias directive that points to the Drupal root containing
+ * index.php. An alias could also be created for a subdomain. See the
+ * @link http://drupal.org/documentation/install online Drupal installation guide @endlink
+ * for more information on setting up domains, subdomains, and subdirectories.
*
- * The above array will cause Drupal to look for a directory named
- * "example.com" in the sites directory whenever a request comes from
- * "example.com", "devexample.com", or "localhost/example". That is 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 into the database
- * (files, system table, etc.) this will ensure the paths are correct while
- * accessed on development servers.
+ * The following examples look for a site configuration in sites/example.com:
+ * @code
+ * URL: http://dev.drupal.org
+ * $sites['dev.drupal.org'] = 'example.com';
*
- * 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.
- */
-
-/**
- * Multi-site directory aliasing:
+ * URL: http://localhost/example
+ * $sites['localhost.example'] = 'example.com';
+ *
+ * URL: http://localhost:8080/example
+ * $sites['8080.localhost.example'] = 'example.com';
+ *
+ * URL: http://www.drupal.org:8080/mysite/test/
+ * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
+ * @endcode
*
- * Edit the lines below to define directory aliases. Remove the leading hash
- * signs to enable.
+ * @see default.settings.php
+ * @see conf_path()
+ * @see http://drupal.org/documentation/install/multi-site
*/
-# $sites['devexample.com'] = 'example.com';
-# $sites['localhost.example'] = 'example.com';