Updating to Varnish 4.1.4-1 on Debian 8

varnish port 80

With the latest update of Varnish, the configuration file has moved to a new place. This is how you do it Debian 8 with varnish 4.1.4-1~jessie:

Create folder and insert in /etc/systemd/system/varnish.service.d/customexec.conf:

sudo -i
mkdir /etc/systemd/system/varnish.service.d
vi /etc/systemd/system/varnish.service.d/customexec.conf

Insert this:

ExecStart=/usr/sbin/varnishd -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m

Restart Varnish and check status

systemctl daemon-reload
systemctl restart varnish.service
# Check config is picked up, ideally it should say ":80 -T localhost:6082" - NOT ":6081 -T localhost:6082"
ps ax | grep varnish;
varnishd -V; # Varnish version
varnishstat; # Varnish status page

FROM: https://www.varnish-cache.org/docs/trunk/tutorial/putting_varnish_on_port_80.html