From wiki.kungfootek.net
Jump to navigation Jump to search

Drupal Varnish Integration


Don't forget to add this to your settings PHP to tell Drupal to use Varnish instead of it's built in cache.

// Add Varnish as the page cache handler.
$conf['cache_backends'] = array('sites/all/modules/varnish/varnish.cache.inc');
$conf['cache_class_cache_page'] = 'VarnishCache';
// Drupal 7 does not cache pages when we invoke hooks during bootstrap. This needs
// to be disabled.
$conf['page_cache_invoke_hooks'] = FALSE;

Drupal Varnish Dashboard


Get the free varnish Agent. You don't need the commercial version.

git clone https://github.com/varnish/vagent2.git

Varnish Agent dependencies:

yum install varnish-libs-devel

Kill Google Analytics Cookies

// Remove has_js and Google Analytics cookies.
set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js)=[^;]*", "");

Change user passwords with Drush

drush user-password someuser --password="NewPassWd"