"What is my IP-address?" with Varnish 4+

Ever thought sites like ifconfig.me and similar are too slow from the command line? Here I'll show you how easy it is to setup something similar to those services - except it is extremely fast because of Varnish.

The receiver part:

sub vcl_recv {
  if (req.http.host == "ip.vanad.is …
more ...

Accelerating Wordpress with Varnish 4

The receiver part:

sub vcl_recv {
  # Wordpress - cache everything except...
  if (!(req.url ~ "wp-admin|xmlrpc\.php|wp-(comments-post|login|activate|mail)\.php|&preview=true")) {
    unset req.http.cookie;
    return (hash);
  }

  # Happens before we check if we have this in cache already.
  # 
  # Typically you clean up the request here, removing cookies you …
more ...