Skip to content

Instantly share code, notes, and snippets.

@chales
Last active December 17, 2015 06:59
Show Gist options
  • Save chales/5569778 to your computer and use it in GitHub Desktop.
Save chales/5569778 to your computer and use it in GitHub Desktop.
An abbreviated Drupal 7 settings.php file
<?php
/**
* @file
* This is an abreaviated Drupal site-specific configuration file.
*
* IMPORTANT NOTE:
* Please review the example.settings.php file for full details on and defaults.
* Many details and instructions are ommitted here for brevity.
*/
/**
* Salt for one-time login links, cancel links, form tokens, etc.
*/
$drupal_hash_salt = '';
/**
* Database settings:
*/
$databases['default']['default'] = array(
'database' => '',
'username' => '',
'password' => '',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => '',
);
/**
* Access control for update.php script.
*/
$update_free_access = FALSE;
/**
* Base URL (optional).
*/
# $base_url = 'http://www.example.com'; // NO trailing slash!
/**
* PHP settings:
*/
ini_set('session.gc_probability', 1);
ini_set('session.gc_divisor', 100);
ini_set('session.gc_maxlifetime', 200000);
ini_set('session.cookie_lifetime', 2000000);
# ini_set('pcre.backtrack_limit', 200000);
# ini_set('pcre.recursion_limit', 200000);
/**
* Specify a shared cookie domain
*/
# $cookie_domain = '.example.com';
/**
* Variable overrides:
*/
# $conf['site_name'] = 'My Drupal site';
# $conf['theme_default'] = 'garland';
# $conf['anonymous'] = 'Visitor';
# $conf['maintenance_theme'] = 'bartik';
/**
* Reverse Proxy Configuration:
*/
# $conf['reverse_proxy'] = TRUE;
# $conf['reverse_proxy_addresses'] = array('a.b.c.d', ...);
# $conf['reverse_proxy_header'] = 'HTTP_X_CLUSTER_CLIENT_IP';
/**
* String overrides:
*/
# $conf['locale_custom_strings_en'][''] = array(
# 'forum' => 'Discussion board',
# '@count min' => '@count minutes',
# );
/**
* Error reporting. 1 = Write errors to log and screen, 2 = Write to log but do not display.
* Set to 2 for production sites.
*/
$conf['error_level'] = 1;
/**
*
* IP blocking:
*/
# $conf['blocked_ips'] = array(
# 'a.b.c.d',
# );
/**
* Fast 404 pages:
*/
$conf['404_fast_paths_exclude'] = '/\/(?:styles)\//';
$conf['404_fast_paths'] = '/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp)$/i';
$conf['404_fast_html'] = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><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>';
# drupal_fast_404();
/**
* External access proxy settings:
*/
# $conf['proxy_server'] = '';
# $conf['proxy_port'] = 8080;
# $conf['proxy_username'] = '';
# $conf['proxy_password'] = '';
# $conf['proxy_user_agent'] = '';
# $conf['proxy_exceptions'] = array('127.0.0.1', 'localhost');
/**
* Authorized file system operations:
*/
# $conf['allow_authorize_operations'] = FALSE;
/**
* Page caching and performance:
* Set to 1 for on, 0 for off.
*/
# $conf['omit_vary_cookie'] = TRUE;
# $conf['css_gzip_compression'] = FALSE;
# $conf['js_gzip_compression'] = FALSE;
# $conf['cache'] = TRUE;
# $conf['block_cache'] = TRUE;
# $conf['cache_lifetime'] = 15 * 60; // In seconds.
# $conf['preprocess_css'] = TRUE;
# $conf['preprocess_js'] = TRUE;
# $conf['file_temporary_path'] = '/tmp';
/**
* Drupal 7 does not cache pages when hooks are invoked during bootstrap. This
* needs to be disabled for Varnish to work. See http://drupal.org/node/804864
*/
# $conf['page_cache_invoke_hooks'] = FALSE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment