Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
90ef06dc
Commit
90ef06dc
authored
11 years ago
by
Jennifer Hodgdon
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2168617
by clemens.tolboom: Fix up docs on how to do multisite
parent
0ec6d117
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/INSTALL.txt
+12
-4
12 additions, 4 deletions
core/INSTALL.txt
sites/default/default.settings.php
+4
-5
4 additions, 5 deletions
sites/default/default.settings.php
sites/example.sites.php
+9
-9
9 additions, 9 deletions
sites/example.sites.php
with
25 additions
and
18 deletions
core/INSTALL.txt
+
12
−
4
View file @
90ef06dc
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
sites/default/default.settings.php
+
4
−
5
View file @
90ef06dc
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
sites/example.sites.php
+
9
−
9
View file @
90ef06dc
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment