annotate sites/example.sites.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 // @codingStandardsIgnoreFile
Chris@0 4
Chris@0 5 /**
Chris@0 6 * @file
Chris@0 7 * Configuration file for multi-site support and directory aliasing feature.
Chris@0 8 *
Chris@0 9 * This file is required for multi-site support and also allows you to define a
Chris@0 10 * set of aliases that map hostnames, ports, and pathnames to configuration
Chris@0 11 * directories in the sites directory. These aliases are loaded prior to
Chris@0 12 * scanning for directories, and they are exempt from the normal discovery
Chris@0 13 * rules. See default.settings.php to view how Drupal discovers the
Chris@0 14 * configuration directory when no alias is found.
Chris@0 15 *
Chris@0 16 * Aliases are useful on development servers, where the domain name may not be
Chris@0 17 * the same as the domain of the live server. Since Drupal stores file paths in
Chris@0 18 * the database (files, system table, etc.) this will ensure the paths are
Chris@0 19 * correct when the site is deployed to a live server.
Chris@0 20 *
Chris@0 21 * To activate this feature, copy and rename it such that its path plus
Chris@0 22 * filename is 'sites/sites.php'.
Chris@0 23 *
Chris@0 24 * Aliases are defined in an associative array named $sites. The array is
Chris@0 25 * written in the format: '<port>.<domain>.<path>' => 'directory'. As an
Chris@0 26 * example, to map https://www.drupal.org:8080/mysite/test to the configuration
Chris@0 27 * directory sites/example.com, the array should be defined as:
Chris@0 28 * @code
Chris@0 29 * $sites = array(
Chris@0 30 * '8080.www.drupal.org.mysite.test' => 'example.com',
Chris@0 31 * );
Chris@0 32 * @endcode
Chris@0 33 * The URL, https://www.drupal.org:8080/mysite/test/, could be a symbolic link
Chris@0 34 * or an Apache Alias directive that points to the Drupal root containing
Chris@0 35 * index.php. An alias could also be created for a subdomain. See the
Chris@0 36 * @link https://www.drupal.org/documentation/install online Drupal installation guide @endlink
Chris@0 37 * for more information on setting up domains, subdomains, and subdirectories.
Chris@0 38 *
Chris@0 39 * The following examples look for a site configuration in sites/example.com:
Chris@0 40 * @code
Chris@0 41 * URL: http://dev.drupal.org
Chris@0 42 * $sites['dev.drupal.org'] = 'example.com';
Chris@0 43 *
Chris@0 44 * URL: http://localhost/example
Chris@0 45 * $sites['localhost.example'] = 'example.com';
Chris@0 46 *
Chris@0 47 * URL: http://localhost:8080/example
Chris@0 48 * $sites['8080.localhost.example'] = 'example.com';
Chris@0 49 *
Chris@0 50 * URL: https://www.drupal.org:8080/mysite/test/
Chris@0 51 * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
Chris@0 52 * @endcode
Chris@0 53 *
Chris@0 54 * @see default.settings.php
Chris@0 55 * @see \Drupal\Core\DrupalKernel::getSitePath()
Chris@0 56 * @see https://www.drupal.org/documentation/install/multi-site
Chris@0 57 */