Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aburnsni/varnish-drupal
https://github.com/aburnsni/varnish-drupal
drupal7 varnish
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aburnsni/varnish-drupal
- Owner: aburnsni
- License: mit
- Created: 2018-05-16T14:15:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-16T14:47:29.000Z (over 6 years ago)
- Last Synced: 2024-10-18T05:09:42.949Z (2 months ago)
- Topics: drupal7, varnish
- Language: VCL
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Varnish-Drupal
Varnish 4.X for Drupal 7.xYou need to use Drupal varnish-7.x-1.x-dev (Varnish 1.x-dev version compatible with Varnish 4.X)
As per the documentation on drupal.org/project/varnish you should add something like the following to your settings.php file:
/** Add Varnish Caching. **/
$conf['varnish_version'] = 4;
// Tell Drupal it's behind a proxy.
$conf['reverse_proxy'] = True;
// Tell Drupal what addresses the proxy server(s) use.
$conf['reverse_proxy_addresses'] = array('127.0.0.1');
// Bypass Drupal bootstrap for anonymous users so that Drupal sets max-age < 0.
$conf['page_cache_invoke_hooks'] = FALSE;
// Make sure that page cache is enabled.
$conf['cache'] = 1;
$conf['cache_lifetime'] = 0;
$conf['page_cache_maximum_age'] = 21600;
// Add Varnish as the page cache handler.
$conf['cache_backends'][] = 'projects/all/modules/varnish/varnish.cache.inc';
$conf['cache_class_cache_page'] = 'VarnishCache';
$conf['reverse_proxy_header'] = 'HTTP_X_FORWARDED_FOR';
$conf['omit_vary_cookie'] = False;
$conf['drupal_http_request_fails'] = FALSE;