SquidGuard is a URL redirector used to use blacklists with the proxysoftware Squid. There are two big advantages to squidguard: it is fast and it is free.
Varnishing Polls
Primary tabs
Edge Side Includes integration
The ESI module includes two Varnish VCL files (located in the docs
directory of the module:
docs/esi_blocks.vcl
- custom sub-routines to handle ESI-block integration.
Copy this file to the Varnish config directory,/usr/local/etc/varnish/
docs/default.vcl
- example code showing how to include the ESI blocks VCL in your Varnish config. Portions of this should be added to appropriate places your Varnish config file. We'll do it by creating a copy,/usr/local/etc/varnish/default-esi.vcl
, that has the portions we want:
include "/usr/local/etc/varnish/esi_blocks.vcl";
sub vcl_recv {
call esi_block__recv;
}sub vcl_hash {
call esi_block__hash;
}sub vcl_fetch {
# don't ESI anything with a 3/4 letter extension
# (e.g. don't try to ESI images, css, etc).
if (! req.url ~ "\..{3,4}$") {
esi;
}call esi_block__fetch;
}Then, edit
/usr/local/etc/varnish/drupal.vcl
and add a line near the beginning:include "/usr/local/etc/varnish/default-esi.vcl";
Restart the Varnishcache:
svc -t /service/varnish
With the module enabled in your Drupal site, block configuration pages now have an ESI Settings section with two options: Enable ESI, and a TTL value.
Poll Enhancements
Installing this module allows anonymous users to vote on polls. By using cookies to track who has voted, multiple users who are behind a firewall will be able vote on polls. There's a threshold setting for how many votes from a single IP in a time period. The module also provides a Use AJAH option - I needed to enable this to have the ESI-enabled Poll block work properly.
Configure Varnish to ignore the poll cookie ( pa-[nid] ) by editing the vcl_recv
section of /usr/local/etc/varnish/drupal.vcl
and inserting a line to remove the cookie:
// Remove pollanon cookies.
set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(pa(.*))=[^;]*", "");
Restart Varnish:
svc -t /service/varnish
- Log in to post comments