Varnish VCL: Case Insensitive Regex

Author: | No comments
By default, a regex match in Varnish happens case sensitive. If you want to use a case insensitive check, you can use the (?i) flag. This is a normal, case sensitive regex check: if ( ~ "^domain.(be|nl|com)$") { ... } To make the same check case insensitive, add the

Varnish Cache 3.0 Is End Of Life

Author: | No comments
A year after the release of Varnish 4, version 3.0 has been declared end-of-life.

Running Varnish 4.x on systemd

Author: | 1 Comment
If you're thinking about running Varnish 4.x on a systemd system, you may be surprised that many of your "older" configs no longer work.

Debug Varnish 4.x on systemd That Fails to Start

Author: | 2 Comments
So you're stuck in systemctl start varnish, now what?

Explicitly Approving (Whitelisting) Cookies in Varnish With Libvmod-Cookie

Author: | No comments
In all my previous Varnish 3.x configs, I've always used blacklisting as the way of handling Cookies. You explicitly tell which cookies you want to remove in vcl_recv, all others remain. But just as security measures, whitelisting is always better than blacklisting.

Varnish FetchError http first read error: -1 11 (Resource temporarily unavailable)

Author: | 3 Comments
Just like the Straight insufficient bytes error, this is another error you can see in your varnishlogs.

Roundup: Belgacom Hack, Defcon, Varnish, HTTPs, Chrome and PHP

Author: | No comments
Here's what happend last week on this blog, just in case you missed it. The Real Cost of the ā€œSā€ in HTTPS The Pirate Bay calls it quits Generate PHP core dumps on segfaults in PHP-FPM Varnish tip: see which cookies are being stripped in your VCL Chrome To

Reload Varnish VCL without losing cache data

Author: | No comments
You can reload the Varnish VCL configuration without actually restarting Varnish. A restart would stop the varnishd process and start it anew, clearing all the cache it has built up in the meantime. But you can also reload the varnish configurations, to load your new VCL without losing the

Combine Apache’s HTTP authentication with X-Forwarded-For IP whitelisting in Varnish

Author: | No comments
Such a long title for a post. If you want to protect a page or an entire website with HTTP authentication, but also want to whitelist a few fixed IPs (for instance: office or VPN IPs), you can combine both authentication mechanismes in Apache via .htaccess files.

Varnish tip: see which cookies are being stripped in your VCL

Author: | No comments
Most Varnish configs contain a lot of logic to strip cookies from the client, to avoid them being sent to the server. This is needed, because cookies are often part of the hash-calculation of a request (if they are included in the vcl_hash routine), and a random cookie would