annotate sites/default/default.settings.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 4c8ae668cc8c
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 /**
Chris@0 4 * @file
Chris@0 5 * Drupal site-specific configuration file.
Chris@0 6 *
Chris@0 7 * IMPORTANT NOTE:
Chris@0 8 * This file may have been set to read-only by the Drupal installation program.
Chris@0 9 * If you make changes to this file, be sure to protect it again after making
Chris@0 10 * your modifications. Failure to remove write permissions to this file is a
Chris@0 11 * security risk.
Chris@0 12 *
Chris@0 13 * In order to use the selection rules below the multisite aliasing file named
Chris@0 14 * sites/sites.php must be present. Its optional settings will be loaded, and
Chris@0 15 * the aliases in the array $sites will override the default directory rules
Chris@0 16 * below. See sites/example.sites.php for more information about aliases.
Chris@0 17 *
Chris@0 18 * The configuration directory will be discovered by stripping the website's
Chris@0 19 * hostname from left to right and pathname from right to left. The first
Chris@0 20 * configuration file found will be used and any others will be ignored. If no
Chris@0 21 * other configuration file is found then the default configuration file at
Chris@0 22 * 'sites/default' will be used.
Chris@0 23 *
Chris@0 24 * For example, for a fictitious site installed at
Chris@0 25 * https://www.drupal.org:8080/mysite/test/, the 'settings.php' file is searched
Chris@0 26 * for in the following directories:
Chris@0 27 *
Chris@0 28 * - sites/8080.www.drupal.org.mysite.test
Chris@0 29 * - sites/www.drupal.org.mysite.test
Chris@0 30 * - sites/drupal.org.mysite.test
Chris@0 31 * - sites/org.mysite.test
Chris@0 32 *
Chris@0 33 * - sites/8080.www.drupal.org.mysite
Chris@0 34 * - sites/www.drupal.org.mysite
Chris@0 35 * - sites/drupal.org.mysite
Chris@0 36 * - sites/org.mysite
Chris@0 37 *
Chris@0 38 * - sites/8080.www.drupal.org
Chris@0 39 * - sites/www.drupal.org
Chris@0 40 * - sites/drupal.org
Chris@0 41 * - sites/org
Chris@0 42 *
Chris@0 43 * - sites/default
Chris@0 44 *
Chris@0 45 * Note that if you are installing on a non-standard port number, prefix the
Chris@0 46 * hostname with that number. For example,
Chris@0 47 * https://www.drupal.org:8080/mysite/test/ could be loaded from
Chris@0 48 * sites/8080.www.drupal.org.mysite.test/.
Chris@0 49 *
Chris@0 50 * @see example.sites.php
Chris@0 51 * @see \Drupal\Core\DrupalKernel::getSitePath()
Chris@0 52 *
Chris@0 53 * In addition to customizing application settings through variables in
Chris@0 54 * settings.php, you can create a services.yml file in the same directory to
Chris@0 55 * register custom, site-specific service definitions and/or swap out default
Chris@0 56 * implementations with custom ones.
Chris@0 57 */
Chris@0 58
Chris@0 59 /**
Chris@0 60 * Database settings:
Chris@0 61 *
Chris@0 62 * The $databases array specifies the database connection or
Chris@0 63 * connections that Drupal may use. Drupal is able to connect
Chris@0 64 * to multiple databases, including multiple types of databases,
Chris@0 65 * during the same request.
Chris@0 66 *
Chris@0 67 * One example of the simplest connection array is shown below. To use the
Chris@0 68 * sample settings, copy and uncomment the code below between the @code and
Chris@0 69 * @endcode lines and paste it after the $databases declaration. You will need
Chris@0 70 * to replace the database username and password and possibly the host and port
Chris@0 71 * with the appropriate credentials for your database system.
Chris@0 72 *
Chris@0 73 * The next section describes how to customize the $databases array for more
Chris@0 74 * specific needs.
Chris@0 75 *
Chris@0 76 * @code
Chris@0 77 * $databases['default']['default'] = array (
Chris@0 78 * 'database' => 'databasename',
Chris@0 79 * 'username' => 'sqlusername',
Chris@0 80 * 'password' => 'sqlpassword',
Chris@0 81 * 'host' => 'localhost',
Chris@0 82 * 'port' => '3306',
Chris@0 83 * 'driver' => 'mysql',
Chris@0 84 * 'prefix' => '',
Chris@0 85 * 'collation' => 'utf8mb4_general_ci',
Chris@0 86 * );
Chris@0 87 * @endcode
Chris@0 88 */
Chris@0 89 $databases = array();
Chris@0 90
Chris@0 91 /**
Chris@0 92 * Customizing database settings.
Chris@0 93 *
Chris@0 94 * Many of the values of the $databases array can be customized for your
Chris@0 95 * particular database system. Refer to the sample in the section above as a
Chris@0 96 * starting point.
Chris@0 97 *
Chris@0 98 * The "driver" property indicates what Drupal database driver the
Chris@0 99 * connection should use. This is usually the same as the name of the
Chris@0 100 * database type, such as mysql or sqlite, but not always. The other
Chris@0 101 * properties will vary depending on the driver. For SQLite, you must
Chris@0 102 * specify a database file name in a directory that is writable by the
Chris@0 103 * webserver. For most other drivers, you must specify a
Chris@0 104 * username, password, host, and database name.
Chris@0 105 *
Chris@0 106 * Transaction support is enabled by default for all drivers that support it,
Chris@0 107 * including MySQL. To explicitly disable it, set the 'transactions' key to
Chris@0 108 * FALSE.
Chris@0 109 * Note that some configurations of MySQL, such as the MyISAM engine, don't
Chris@0 110 * support it and will proceed silently even if enabled. If you experience
Chris@0 111 * transaction related crashes with such configuration, set the 'transactions'
Chris@0 112 * key to FALSE.
Chris@0 113 *
Chris@0 114 * For each database, you may optionally specify multiple "target" databases.
Chris@0 115 * A target database allows Drupal to try to send certain queries to a
Chris@0 116 * different database if it can but fall back to the default connection if not.
Chris@0 117 * That is useful for primary/replica replication, as Drupal may try to connect
Chris@0 118 * to a replica server when appropriate and if one is not available will simply
Chris@0 119 * fall back to the single primary server (The terms primary/replica are
Chris@0 120 * traditionally referred to as master/slave in database server documentation).
Chris@0 121 *
Chris@0 122 * The general format for the $databases array is as follows:
Chris@0 123 * @code
Chris@0 124 * $databases['default']['default'] = $info_array;
Chris@0 125 * $databases['default']['replica'][] = $info_array;
Chris@0 126 * $databases['default']['replica'][] = $info_array;
Chris@0 127 * $databases['extra']['default'] = $info_array;
Chris@0 128 * @endcode
Chris@0 129 *
Chris@0 130 * In the above example, $info_array is an array of settings described above.
Chris@0 131 * The first line sets a "default" database that has one primary database
Chris@0 132 * (the second level default). The second and third lines create an array
Chris@0 133 * of potential replica databases. Drupal will select one at random for a given
Chris@0 134 * request as needed. The fourth line creates a new database with a name of
Chris@0 135 * "extra".
Chris@0 136 *
Chris@0 137 * You can optionally set prefixes for some or all database table names
Chris@0 138 * by using the 'prefix' setting. If a prefix is specified, the table
Chris@0 139 * name will be prepended with its value. Be sure to use valid database
Chris@0 140 * characters only, usually alphanumeric and underscore. If no prefixes
Chris@0 141 * are desired, leave it as an empty string ''.
Chris@0 142 *
Chris@0 143 * To have all database names prefixed, set 'prefix' as a string:
Chris@0 144 * @code
Chris@0 145 * 'prefix' => 'main_',
Chris@0 146 * @endcode
Chris@0 147 *
Chris@0 148 * Per-table prefixes are deprecated as of Drupal 8.2, and will be removed in
Chris@0 149 * Drupal 9.0. After that, only a single prefix for all tables will be
Chris@0 150 * supported.
Chris@0 151 *
Chris@0 152 * To provide prefixes for specific tables, set 'prefix' as an array.
Chris@0 153 * The array's keys are the table names and the values are the prefixes.
Chris@0 154 * The 'default' element is mandatory and holds the prefix for any tables
Chris@0 155 * not specified elsewhere in the array. Example:
Chris@0 156 * @code
Chris@0 157 * 'prefix' => array(
Chris@0 158 * 'default' => 'main_',
Chris@0 159 * 'users' => 'shared_',
Chris@0 160 * 'sessions' => 'shared_',
Chris@0 161 * 'role' => 'shared_',
Chris@0 162 * 'authmap' => 'shared_',
Chris@0 163 * ),
Chris@0 164 * @endcode
Chris@0 165 * You can also use a reference to a schema/database as a prefix. This may be
Chris@0 166 * useful if your Drupal installation exists in a schema that is not the default
Chris@0 167 * or you want to access several databases from the same code base at the same
Chris@0 168 * time.
Chris@0 169 * Example:
Chris@0 170 * @code
Chris@0 171 * 'prefix' => array(
Chris@0 172 * 'default' => 'main.',
Chris@0 173 * 'users' => 'shared.',
Chris@0 174 * 'sessions' => 'shared.',
Chris@0 175 * 'role' => 'shared.',
Chris@0 176 * 'authmap' => 'shared.',
Chris@0 177 * );
Chris@0 178 * @endcode
Chris@0 179 * NOTE: MySQL and SQLite's definition of a schema is a database.
Chris@0 180 *
Chris@0 181 * Advanced users can add or override initial commands to execute when
Chris@0 182 * connecting to the database server, as well as PDO connection settings. For
Chris@0 183 * example, to enable MySQL SELECT queries to exceed the max_join_size system
Chris@0 184 * variable, and to reduce the database connection timeout to 5 seconds:
Chris@0 185 * @code
Chris@0 186 * $databases['default']['default'] = array(
Chris@0 187 * 'init_commands' => array(
Chris@0 188 * 'big_selects' => 'SET SQL_BIG_SELECTS=1',
Chris@0 189 * ),
Chris@0 190 * 'pdo' => array(
Chris@0 191 * PDO::ATTR_TIMEOUT => 5,
Chris@0 192 * ),
Chris@0 193 * );
Chris@0 194 * @endcode
Chris@0 195 *
Chris@0 196 * WARNING: The above defaults are designed for database portability. Changing
Chris@0 197 * them may cause unexpected behavior, including potential data loss. See
Chris@0 198 * https://www.drupal.org/developing/api/database/configuration for more
Chris@0 199 * information on these defaults and the potential issues.
Chris@0 200 *
Chris@0 201 * More details can be found in the constructor methods for each driver:
Chris@0 202 * - \Drupal\Core\Database\Driver\mysql\Connection::__construct()
Chris@0 203 * - \Drupal\Core\Database\Driver\pgsql\Connection::__construct()
Chris@0 204 * - \Drupal\Core\Database\Driver\sqlite\Connection::__construct()
Chris@0 205 *
Chris@0 206 * Sample Database configuration format for PostgreSQL (pgsql):
Chris@0 207 * @code
Chris@0 208 * $databases['default']['default'] = array(
Chris@0 209 * 'driver' => 'pgsql',
Chris@0 210 * 'database' => 'databasename',
Chris@0 211 * 'username' => 'sqlusername',
Chris@0 212 * 'password' => 'sqlpassword',
Chris@0 213 * 'host' => 'localhost',
Chris@0 214 * 'prefix' => '',
Chris@0 215 * );
Chris@0 216 * @endcode
Chris@0 217 *
Chris@0 218 * Sample Database configuration format for SQLite (sqlite):
Chris@0 219 * @code
Chris@0 220 * $databases['default']['default'] = array(
Chris@0 221 * 'driver' => 'sqlite',
Chris@0 222 * 'database' => '/path/to/databasefilename',
Chris@0 223 * );
Chris@0 224 * @endcode
Chris@0 225 */
Chris@0 226
Chris@0 227 /**
Chris@0 228 * Location of the site configuration files.
Chris@0 229 *
Chris@0 230 * The $config_directories array specifies the location of file system
Chris@0 231 * directories used for configuration data. On install, the "sync" directory is
Chris@0 232 * created. This is used for configuration imports. The "active" directory is
Chris@0 233 * not created by default since the default storage for active configuration is
Chris@0 234 * the database rather than the file system. (This can be changed. See "Active
Chris@0 235 * configuration settings" below).
Chris@0 236 *
Chris@0 237 * The default location for the "sync" directory is inside a randomly-named
Chris@0 238 * directory in the public files path. The setting below allows you to override
Chris@0 239 * the "sync" location.
Chris@0 240 *
Chris@0 241 * If you use files for the "active" configuration, you can tell the
Chris@0 242 * Configuration system where this directory is located by adding an entry with
Chris@0 243 * array key CONFIG_ACTIVE_DIRECTORY.
Chris@0 244 *
Chris@0 245 * Example:
Chris@0 246 * @code
Chris@0 247 * $config_directories = array(
Chris@0 248 * CONFIG_SYNC_DIRECTORY => '/directory/outside/webroot',
Chris@0 249 * );
Chris@0 250 * @endcode
Chris@0 251 */
Chris@0 252 $config_directories = array();
Chris@0 253
Chris@0 254 /**
Chris@0 255 * Settings:
Chris@0 256 *
Chris@0 257 * $settings contains environment-specific configuration, such as the files
Chris@0 258 * directory and reverse proxy address, and temporary configuration, such as
Chris@0 259 * security overrides.
Chris@0 260 *
Chris@0 261 * @see \Drupal\Core\Site\Settings::get()
Chris@0 262 */
Chris@0 263
Chris@0 264 /**
Chris@0 265 * The active installation profile.
Chris@0 266 *
Chris@0 267 * Changing this after installation is not recommended as it changes which
Chris@0 268 * directories are scanned during extension discovery. If this is set prior to
Chris@0 269 * installation this value will be rewritten according to the profile selected
Chris@0 270 * by the user.
Chris@0 271 *
Chris@0 272 * @see install_select_profile()
Chris@0 273 *
Chris@0 274 * @deprecated in Drupal 8.3.0 and will be removed before Drupal 9.0.0. The
Chris@0 275 * install profile is written to the core.extension configuration. If a
Chris@0 276 * service requires the install profile use the 'install_profile' container
Chris@0 277 * parameter. Functional code can use \Drupal::installProfile().
Chris@0 278 */
Chris@0 279 # $settings['install_profile'] = '';
Chris@0 280
Chris@0 281 /**
Chris@0 282 * Salt for one-time login links, cancel links, form tokens, etc.
Chris@0 283 *
Chris@0 284 * This variable will be set to a random value by the installer. All one-time
Chris@0 285 * login links will be invalidated if the value is changed. Note that if your
Chris@0 286 * site is deployed on a cluster of web servers, you must ensure that this
Chris@0 287 * variable has the same value on each server.
Chris@0 288 *
Chris@0 289 * For enhanced security, you may set this variable to the contents of a file
Chris@0 290 * outside your document root; you should also ensure that this file is not
Chris@0 291 * stored with backups of your database.
Chris@0 292 *
Chris@0 293 * Example:
Chris@0 294 * @code
Chris@0 295 * $settings['hash_salt'] = file_get_contents('/home/example/salt.txt');
Chris@0 296 * @endcode
Chris@0 297 */
Chris@0 298 $settings['hash_salt'] = '';
Chris@0 299
Chris@0 300 /**
Chris@0 301 * Deployment identifier.
Chris@0 302 *
Chris@0 303 * Drupal's dependency injection container will be automatically invalidated and
Chris@0 304 * rebuilt when the Drupal core version changes. When updating contributed or
Chris@0 305 * custom code that changes the container, changing this identifier will also
Chris@0 306 * allow the container to be invalidated as soon as code is deployed.
Chris@0 307 */
Chris@0 308 # $settings['deployment_identifier'] = \Drupal::VERSION;
Chris@0 309
Chris@0 310 /**
Chris@0 311 * Access control for update.php script.
Chris@0 312 *
Chris@0 313 * If you are updating your Drupal installation using the update.php script but
Chris@0 314 * are not logged in using either an account with the "Administer software
Chris@0 315 * updates" permission or the site maintenance account (the account that was
Chris@0 316 * created during installation), you will need to modify the access check
Chris@0 317 * statement below. Change the FALSE to a TRUE to disable the access check.
Chris@0 318 * After finishing the upgrade, be sure to open this file again and change the
Chris@0 319 * TRUE back to a FALSE!
Chris@0 320 */
Chris@0 321 $settings['update_free_access'] = FALSE;
Chris@0 322
Chris@0 323 /**
Chris@0 324 * External access proxy settings:
Chris@0 325 *
Chris@0 326 * If your site must access the Internet via a web proxy then you can enter the
Chris@0 327 * proxy settings here. Set the full URL of the proxy, including the port, in
Chris@0 328 * variables:
Chris@0 329 * - $settings['http_client_config']['proxy']['http']: The proxy URL for HTTP
Chris@0 330 * requests.
Chris@0 331 * - $settings['http_client_config']['proxy']['https']: The proxy URL for HTTPS
Chris@0 332 * requests.
Chris@0 333 * You can pass in the user name and password for basic authentication in the
Chris@0 334 * URLs in these settings.
Chris@0 335 *
Chris@0 336 * You can also define an array of host names that can be accessed directly,
Chris@0 337 * bypassing the proxy, in $settings['http_client_config']['proxy']['no'].
Chris@0 338 */
Chris@0 339 # $settings['http_client_config']['proxy']['http'] = 'http://proxy_user:proxy_pass@example.com:8080';
Chris@0 340 # $settings['http_client_config']['proxy']['https'] = 'http://proxy_user:proxy_pass@example.com:8080';
Chris@0 341 # $settings['http_client_config']['proxy']['no'] = ['127.0.0.1', 'localhost'];
Chris@0 342
Chris@0 343 /**
Chris@0 344 * Reverse Proxy Configuration:
Chris@0 345 *
Chris@0 346 * Reverse proxy servers are often used to enhance the performance
Chris@0 347 * of heavily visited sites and may also provide other site caching,
Chris@0 348 * security, or encryption benefits. In an environment where Drupal
Chris@0 349 * is behind a reverse proxy, the real IP address of the client should
Chris@0 350 * be determined such that the correct client IP address is available
Chris@0 351 * to Drupal's logging, statistics, and access management systems. In
Chris@0 352 * the most simple scenario, the proxy server will add an
Chris@0 353 * X-Forwarded-For header to the request that contains the client IP
Chris@0 354 * address. However, HTTP headers are vulnerable to spoofing, where a
Chris@0 355 * malicious client could bypass restrictions by setting the
Chris@0 356 * X-Forwarded-For header directly. Therefore, Drupal's proxy
Chris@0 357 * configuration requires the IP addresses of all remote proxies to be
Chris@0 358 * specified in $settings['reverse_proxy_addresses'] to work correctly.
Chris@0 359 *
Chris@0 360 * Enable this setting to get Drupal to determine the client IP from
Chris@0 361 * the X-Forwarded-For header (or $settings['reverse_proxy_header'] if set).
Chris@0 362 * If you are unsure about this setting, do not have a reverse proxy,
Chris@0 363 * or Drupal operates in a shared hosting environment, this setting
Chris@0 364 * should remain commented out.
Chris@0 365 *
Chris@0 366 * In order for this setting to be used you must specify every possible
Chris@0 367 * reverse proxy IP address in $settings['reverse_proxy_addresses'].
Chris@0 368 * If a complete list of reverse proxies is not available in your
Chris@0 369 * environment (for example, if you use a CDN) you may set the
Chris@0 370 * $_SERVER['REMOTE_ADDR'] variable directly in settings.php.
Chris@0 371 * Be aware, however, that it is likely that this would allow IP
Chris@0 372 * address spoofing unless more advanced precautions are taken.
Chris@0 373 */
Chris@0 374 # $settings['reverse_proxy'] = TRUE;
Chris@0 375
Chris@0 376 /**
Chris@0 377 * Specify every reverse proxy IP address in your environment.
Chris@0 378 * This setting is required if $settings['reverse_proxy'] is TRUE.
Chris@0 379 */
Chris@0 380 # $settings['reverse_proxy_addresses'] = array('a.b.c.d', ...);
Chris@0 381
Chris@0 382 /**
Chris@0 383 * Set this value if your proxy server sends the client IP in a header
Chris@0 384 * other than X-Forwarded-For.
Chris@0 385 */
Chris@0 386 # $settings['reverse_proxy_header'] = 'X_CLUSTER_CLIENT_IP';
Chris@0 387
Chris@0 388 /**
Chris@0 389 * Set this value if your proxy server sends the client protocol in a header
Chris@0 390 * other than X-Forwarded-Proto.
Chris@0 391 */
Chris@0 392 # $settings['reverse_proxy_proto_header'] = 'X_FORWARDED_PROTO';
Chris@0 393
Chris@0 394 /**
Chris@0 395 * Set this value if your proxy server sends the client protocol in a header
Chris@0 396 * other than X-Forwarded-Host.
Chris@0 397 */
Chris@0 398 # $settings['reverse_proxy_host_header'] = 'X_FORWARDED_HOST';
Chris@0 399
Chris@0 400 /**
Chris@0 401 * Set this value if your proxy server sends the client protocol in a header
Chris@0 402 * other than X-Forwarded-Port.
Chris@0 403 */
Chris@0 404 # $settings['reverse_proxy_port_header'] = 'X_FORWARDED_PORT';
Chris@0 405
Chris@0 406 /**
Chris@0 407 * Set this value if your proxy server sends the client protocol in a header
Chris@0 408 * other than Forwarded.
Chris@0 409 */
Chris@0 410 # $settings['reverse_proxy_forwarded_header'] = 'FORWARDED';
Chris@0 411
Chris@0 412 /**
Chris@0 413 * Page caching:
Chris@0 414 *
Chris@0 415 * By default, Drupal sends a "Vary: Cookie" HTTP header for anonymous page
Chris@0 416 * views. This tells a HTTP proxy that it may return a page from its local
Chris@0 417 * cache without contacting the web server, if the user sends the same Cookie
Chris@0 418 * header as the user who originally requested the cached page. Without "Vary:
Chris@0 419 * Cookie", authenticated users would also be served the anonymous page from
Chris@0 420 * the cache. If the site has mostly anonymous users except a few known
Chris@0 421 * editors/administrators, the Vary header can be omitted. This allows for
Chris@0 422 * better caching in HTTP proxies (including reverse proxies), i.e. even if
Chris@0 423 * clients send different cookies, they still get content served from the cache.
Chris@0 424 * However, authenticated users should access the site directly (i.e. not use an
Chris@0 425 * HTTP proxy, and bypass the reverse proxy if one is used) in order to avoid
Chris@0 426 * getting cached pages from the proxy.
Chris@0 427 */
Chris@0 428 # $settings['omit_vary_cookie'] = TRUE;
Chris@0 429
Chris@0 430
Chris@0 431 /**
Chris@0 432 * Cache TTL for client error (4xx) responses.
Chris@0 433 *
Chris@0 434 * Items cached per-URL tend to result in a large number of cache items, and
Chris@0 435 * this can be problematic on 404 pages which by their nature are unbounded. A
Chris@0 436 * fixed TTL can be set for these items, defaulting to one hour, so that cache
Chris@0 437 * backends which do not support LRU can purge older entries. To disable caching
Chris@0 438 * of client error responses set the value to 0. Currently applies only to
Chris@0 439 * page_cache module.
Chris@0 440 */
Chris@0 441 # $settings['cache_ttl_4xx'] = 3600;
Chris@0 442
Chris@0 443 /**
Chris@0 444 * Expiration of cached forms.
Chris@0 445 *
Chris@0 446 * Drupal's Form API stores details of forms in a cache and these entries are
Chris@0 447 * kept for at least 6 hours by default. Expired entries are cleared by cron.
Chris@0 448 *
Chris@0 449 * @see \Drupal\Core\Form\FormCache::setCache()
Chris@0 450 */
Chris@0 451 # $settings['form_cache_expiration'] = 21600;
Chris@0 452
Chris@0 453 /**
Chris@0 454 * Class Loader.
Chris@0 455 *
Chris@0 456 * If the APC extension is detected, the Symfony APC class loader is used for
Chris@0 457 * performance reasons. Detection can be prevented by setting
Chris@0 458 * class_loader_auto_detect to false, as in the example below.
Chris@0 459 */
Chris@0 460 # $settings['class_loader_auto_detect'] = FALSE;
Chris@0 461
Chris@0 462 /*
Chris@0 463 * If the APC extension is not detected, either because APC is missing or
Chris@0 464 * because auto-detection has been disabled, auto-loading falls back to
Chris@0 465 * Composer's ClassLoader, which is good for development as it does not break
Chris@0 466 * when code is moved in the file system. You can also decorate the base class
Chris@0 467 * loader with another cached solution than the Symfony APC class loader, as
Chris@0 468 * all production sites should have a cached class loader of some sort enabled.
Chris@0 469 *
Chris@0 470 * To do so, you may decorate and replace the local $class_loader variable. For
Chris@0 471 * example, to use Symfony's APC class loader without automatic detection,
Chris@0 472 * uncomment the code below.
Chris@0 473 */
Chris@0 474 /*
Chris@0 475 if ($settings['hash_salt']) {
Chris@0 476 $prefix = 'drupal.' . hash('sha256', 'drupal.' . $settings['hash_salt']);
Chris@0 477 $apc_loader = new \Symfony\Component\ClassLoader\ApcClassLoader($prefix, $class_loader);
Chris@0 478 unset($prefix);
Chris@0 479 $class_loader->unregister();
Chris@0 480 $apc_loader->register();
Chris@0 481 $class_loader = $apc_loader;
Chris@0 482 }
Chris@0 483 */
Chris@0 484
Chris@0 485 /**
Chris@0 486 * Authorized file system operations:
Chris@0 487 *
Chris@0 488 * The Update Manager module included with Drupal provides a mechanism for
Chris@0 489 * site administrators to securely install missing updates for the site
Chris@0 490 * directly through the web user interface. On securely-configured servers,
Chris@0 491 * the Update manager will require the administrator to provide SSH or FTP
Chris@0 492 * credentials before allowing the installation to proceed; this allows the
Chris@0 493 * site to update the new files as the user who owns all the Drupal files,
Chris@0 494 * instead of as the user the webserver is running as. On servers where the
Chris@0 495 * webserver user is itself the owner of the Drupal files, the administrator
Chris@0 496 * will not be prompted for SSH or FTP credentials (note that these server
Chris@0 497 * setups are common on shared hosting, but are inherently insecure).
Chris@0 498 *
Chris@0 499 * Some sites might wish to disable the above functionality, and only update
Chris@0 500 * the code directly via SSH or FTP themselves. This setting completely
Chris@0 501 * disables all functionality related to these authorized file operations.
Chris@0 502 *
Chris@0 503 * @see https://www.drupal.org/node/244924
Chris@0 504 *
Chris@0 505 * Remove the leading hash signs to disable.
Chris@0 506 */
Chris@0 507 # $settings['allow_authorize_operations'] = FALSE;
Chris@0 508
Chris@0 509 /**
Chris@0 510 * Default mode for directories and files written by Drupal.
Chris@0 511 *
Chris@0 512 * Value should be in PHP Octal Notation, with leading zero.
Chris@0 513 */
Chris@0 514 # $settings['file_chmod_directory'] = 0775;
Chris@0 515 # $settings['file_chmod_file'] = 0664;
Chris@0 516
Chris@0 517 /**
Chris@0 518 * Public file base URL:
Chris@0 519 *
Chris@0 520 * An alternative base URL to be used for serving public files. This must
Chris@0 521 * include any leading directory path.
Chris@0 522 *
Chris@0 523 * A different value from the domain used by Drupal to be used for accessing
Chris@0 524 * public files. This can be used for a simple CDN integration, or to improve
Chris@0 525 * security by serving user-uploaded files from a different domain or subdomain
Chris@0 526 * pointing to the same server. Do not include a trailing slash.
Chris@0 527 */
Chris@0 528 # $settings['file_public_base_url'] = 'http://downloads.example.com/files';
Chris@0 529
Chris@0 530 /**
Chris@0 531 * Public file path:
Chris@0 532 *
Chris@0 533 * A local file system path where public files will be stored. This directory
Chris@0 534 * must exist and be writable by Drupal. This directory must be relative to
Chris@0 535 * the Drupal installation directory and be accessible over the web.
Chris@0 536 */
Chris@0 537 # $settings['file_public_path'] = 'sites/default/files';
Chris@0 538
Chris@0 539 /**
Chris@0 540 * Private file path:
Chris@0 541 *
Chris@0 542 * A local file system path where private files will be stored. This directory
Chris@0 543 * must be absolute, outside of the Drupal installation directory and not
Chris@0 544 * accessible over the web.
Chris@0 545 *
Chris@0 546 * Note: Caches need to be cleared when this value is changed to make the
Chris@0 547 * private:// stream wrapper available to the system.
Chris@0 548 *
Chris@0 549 * See https://www.drupal.org/documentation/modules/file for more information
Chris@0 550 * about securing private files.
Chris@0 551 */
Chris@0 552 # $settings['file_private_path'] = '';
Chris@0 553
Chris@0 554 /**
Chris@0 555 * Session write interval:
Chris@0 556 *
Chris@0 557 * Set the minimum interval between each session write to database.
Chris@0 558 * For performance reasons it defaults to 180.
Chris@0 559 */
Chris@0 560 # $settings['session_write_interval'] = 180;
Chris@0 561
Chris@0 562 /**
Chris@0 563 * String overrides:
Chris@0 564 *
Chris@0 565 * To override specific strings on your site with or without enabling the Locale
Chris@0 566 * module, add an entry to this list. This functionality allows you to change
Chris@0 567 * a small number of your site's default English language interface strings.
Chris@0 568 *
Chris@0 569 * Remove the leading hash signs to enable.
Chris@0 570 *
Chris@0 571 * The "en" part of the variable name, is dynamic and can be any langcode of
Chris@0 572 * any added language. (eg locale_custom_strings_de for german).
Chris@0 573 */
Chris@0 574 # $settings['locale_custom_strings_en'][''] = array(
Chris@0 575 # 'forum' => 'Discussion board',
Chris@0 576 # '@count min' => '@count minutes',
Chris@0 577 # );
Chris@0 578
Chris@0 579 /**
Chris@0 580 * A custom theme for the offline page:
Chris@0 581 *
Chris@0 582 * This applies when the site is explicitly set to maintenance mode through the
Chris@0 583 * administration page or when the database is inactive due to an error.
Chris@0 584 * The template file should also be copied into the theme. It is located inside
Chris@0 585 * 'core/modules/system/templates/maintenance-page.html.twig'.
Chris@0 586 *
Chris@0 587 * Note: This setting does not apply to installation and update pages.
Chris@0 588 */
Chris@0 589 # $settings['maintenance_theme'] = 'bartik';
Chris@0 590
Chris@0 591 /**
Chris@0 592 * PHP settings:
Chris@0 593 *
Chris@0 594 * To see what PHP settings are possible, including whether they can be set at
Chris@0 595 * runtime (by using ini_set()), read the PHP documentation:
Chris@0 596 * http://php.net/manual/ini.list.php
Chris@0 597 * See \Drupal\Core\DrupalKernel::bootEnvironment() for required runtime
Chris@0 598 * settings and the .htaccess file for non-runtime settings.
Chris@0 599 * Settings defined there should not be duplicated here so as to avoid conflict
Chris@0 600 * issues.
Chris@0 601 */
Chris@0 602
Chris@0 603 /**
Chris@0 604 * If you encounter a situation where users post a large amount of text, and
Chris@0 605 * the result is stripped out upon viewing but can still be edited, Drupal's
Chris@0 606 * output filter may not have sufficient memory to process it. If you
Chris@0 607 * experience this issue, you may wish to uncomment the following two lines
Chris@0 608 * and increase the limits of these variables. For more information, see
Chris@0 609 * http://php.net/manual/pcre.configuration.php.
Chris@0 610 */
Chris@0 611 # ini_set('pcre.backtrack_limit', 200000);
Chris@0 612 # ini_set('pcre.recursion_limit', 200000);
Chris@0 613
Chris@0 614 /**
Chris@0 615 * Active configuration settings.
Chris@0 616 *
Chris@0 617 * By default, the active configuration is stored in the database in the
Chris@0 618 * {config} table. To use a different storage mechanism for the active
Chris@0 619 * configuration, do the following prior to installing:
Chris@0 620 * - Create an "active" directory and declare its path in $config_directories
Chris@0 621 * as explained under the 'Location of the site configuration files' section
Chris@0 622 * above in this file. To enhance security, you can declare a path that is
Chris@0 623 * outside your document root.
Chris@0 624 * - Override the 'bootstrap_config_storage' setting here. It must be set to a
Chris@0 625 * callable that returns an object that implements
Chris@0 626 * \Drupal\Core\Config\StorageInterface.
Chris@0 627 * - Override the service definition 'config.storage.active'. Put this
Chris@0 628 * override in a services.yml file in the same directory as settings.php
Chris@0 629 * (definitions in this file will override service definition defaults).
Chris@0 630 */
Chris@0 631 # $settings['bootstrap_config_storage'] = array('Drupal\Core\Config\BootstrapConfigStorageFactory', 'getFileStorage');
Chris@0 632
Chris@0 633 /**
Chris@0 634 * Configuration overrides.
Chris@0 635 *
Chris@0 636 * To globally override specific configuration values for this site,
Chris@0 637 * set them here. You usually don't need to use this feature. This is
Chris@0 638 * useful in a configuration file for a vhost or directory, rather than
Chris@0 639 * the default settings.php.
Chris@0 640 *
Chris@0 641 * Note that any values you provide in these variable overrides will not be
Chris@0 642 * viewable from the Drupal administration interface. The administration
Chris@0 643 * interface displays the values stored in configuration so that you can stage
Chris@0 644 * changes to other environments that don't have the overrides.
Chris@0 645 *
Chris@0 646 * There are particular configuration values that are risky to override. For
Chris@0 647 * example, overriding the list of installed modules in 'core.extension' is not
Chris@0 648 * supported as module install or uninstall has not occurred. Other examples
Chris@0 649 * include field storage configuration, because it has effects on database
Chris@0 650 * structure, and 'core.menu.static_menu_link_overrides' since this is cached in
Chris@0 651 * a way that is not config override aware. Also, note that changing
Chris@0 652 * configuration values in settings.php will not fire any of the configuration
Chris@0 653 * change events.
Chris@0 654 */
Chris@0 655 # $config['system.file']['path']['temporary'] = '/tmp';
Chris@0 656 # $config['system.site']['name'] = 'My Drupal site';
Chris@0 657 # $config['system.theme']['default'] = 'stark';
Chris@0 658 # $config['user.settings']['anonymous'] = 'Visitor';
Chris@0 659
Chris@0 660 /**
Chris@0 661 * Fast 404 pages:
Chris@0 662 *
Chris@0 663 * Drupal can generate fully themed 404 pages. However, some of these responses
Chris@0 664 * are for images or other resource files that are not displayed to the user.
Chris@0 665 * This can waste bandwidth, and also generate server load.
Chris@0 666 *
Chris@0 667 * The options below return a simple, fast 404 page for URLs matching a
Chris@0 668 * specific pattern:
Chris@0 669 * - $config['system.performance']['fast_404']['exclude_paths']: A regular
Chris@0 670 * expression to match paths to exclude, such as images generated by image
Chris@0 671 * styles, or dynamically-resized images. The default pattern provided below
Chris@0 672 * also excludes the private file system. If you need to add more paths, you
Chris@0 673 * can add '|path' to the expression.
Chris@0 674 * - $config['system.performance']['fast_404']['paths']: A regular expression to
Chris@0 675 * match paths that should return a simple 404 page, rather than the fully
Chris@0 676 * themed 404 page. If you don't have any aliases ending in htm or html you
Chris@0 677 * can add '|s?html?' to the expression.
Chris@0 678 * - $config['system.performance']['fast_404']['html']: The html to return for
Chris@0 679 * simple 404 pages.
Chris@0 680 *
Chris@0 681 * Remove the leading hash signs if you would like to alter this functionality.
Chris@0 682 */
Chris@0 683 # $config['system.performance']['fast_404']['exclude_paths'] = '/\/(?:styles)|(?:system\/files)\//';
Chris@0 684 # $config['system.performance']['fast_404']['paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
Chris@0 685 # $config['system.performance']['fast_404']['html'] = '<!DOCTYPE html><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>';
Chris@0 686
Chris@0 687 /**
Chris@0 688 * Load services definition file.
Chris@0 689 */
Chris@0 690 $settings['container_yamls'][] = $app_root . '/' . $site_path . '/services.yml';
Chris@0 691
Chris@0 692 /**
Chris@0 693 * Override the default service container class.
Chris@0 694 *
Chris@0 695 * This is useful for example to trace the service container for performance
Chris@0 696 * tracking purposes, for testing a service container with an error condition or
Chris@0 697 * to test a service container that throws an exception.
Chris@0 698 */
Chris@0 699 # $settings['container_base_class'] = '\Drupal\Core\DependencyInjection\Container';
Chris@0 700
Chris@0 701 /**
Chris@0 702 * Override the default yaml parser class.
Chris@0 703 *
Chris@0 704 * Provide a fully qualified class name here if you would like to provide an
Chris@0 705 * alternate implementation YAML parser. The class must implement the
Chris@0 706 * \Drupal\Component\Serialization\SerializationInterface interface.
Chris@0 707 */
Chris@0 708 # $settings['yaml_parser_class'] = NULL;
Chris@0 709
Chris@0 710 /**
Chris@0 711 * Trusted host configuration.
Chris@0 712 *
Chris@0 713 * Drupal core can use the Symfony trusted host mechanism to prevent HTTP Host
Chris@0 714 * header spoofing.
Chris@0 715 *
Chris@0 716 * To enable the trusted host mechanism, you enable your allowable hosts
Chris@0 717 * in $settings['trusted_host_patterns']. This should be an array of regular
Chris@0 718 * expression patterns, without delimiters, representing the hosts you would
Chris@0 719 * like to allow.
Chris@0 720 *
Chris@0 721 * For example:
Chris@0 722 * @code
Chris@0 723 * $settings['trusted_host_patterns'] = array(
Chris@0 724 * '^www\.example\.com$',
Chris@0 725 * );
Chris@0 726 * @endcode
Chris@0 727 * will allow the site to only run from www.example.com.
Chris@0 728 *
Chris@0 729 * If you are running multisite, or if you are running your site from
Chris@0 730 * different domain names (eg, you don't redirect http://www.example.com to
Chris@0 731 * http://example.com), you should specify all of the host patterns that are
Chris@0 732 * allowed by your site.
Chris@0 733 *
Chris@0 734 * For example:
Chris@0 735 * @code
Chris@0 736 * $settings['trusted_host_patterns'] = array(
Chris@0 737 * '^example\.com$',
Chris@0 738 * '^.+\.example\.com$',
Chris@0 739 * '^example\.org$',
Chris@0 740 * '^.+\.example\.org$',
Chris@0 741 * );
Chris@0 742 * @endcode
Chris@0 743 * will allow the site to run off of all variants of example.com and
Chris@0 744 * example.org, with all subdomains included.
Chris@0 745 */
Chris@0 746
Chris@0 747 /**
Chris@0 748 * The default list of directories that will be ignored by Drupal's file API.
Chris@0 749 *
Chris@0 750 * By default ignore node_modules and bower_components folders to avoid issues
Chris@0 751 * with common frontend tools and recursive scanning of directories looking for
Chris@0 752 * extensions.
Chris@0 753 *
Chris@0 754 * @see file_scan_directory()
Chris@0 755 * @see \Drupal\Core\Extension\ExtensionDiscovery::scanDirectory()
Chris@0 756 */
Chris@0 757 $settings['file_scan_ignore_directories'] = [
Chris@0 758 'node_modules',
Chris@0 759 'bower_components',
Chris@0 760 ];
Chris@0 761
Chris@0 762 /**
Chris@0 763 * The default number of entities to update in a batch process.
Chris@0 764 *
Chris@0 765 * This is used by update and post-update functions that need to go through and
Chris@0 766 * change all the entities on a site, so it is useful to increase this number
Chris@0 767 * if your hosting configuration (i.e. RAM allocation, CPU speed) allows for a
Chris@0 768 * larger number of entities to be processed in a single batch run.
Chris@0 769 */
Chris@0 770 $settings['entity_update_batch_size'] = 50;
Chris@0 771
Chris@0 772 /**
Chris@0 773 * Load local development override configuration, if available.
Chris@0 774 *
Chris@0 775 * Use settings.local.php to override variables on secondary (staging,
Chris@0 776 * development, etc) installations of this site. Typically used to disable
Chris@0 777 * caching, JavaScript/CSS compression, re-routing of outgoing emails, and
Chris@0 778 * other things that should not happen on development and testing sites.
Chris@0 779 *
Chris@0 780 * Keep this code block at the end of this file to take full effect.
Chris@0 781 */
Chris@0 782 #
Chris@0 783 # if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
Chris@0 784 # include $app_root . '/' . $site_path . '/settings.local.php';
Chris@0 785 # }