Install Varnish 5 on Ubuntu 16.04
You running Varnish 4 or 5 under Ubuntu 16.04 and have disable IPv6. You become following error.
Error: Cannot open socket: :6081: Address family not supported by protocol
https://github.com/varnishcache/varnish-cache/issues/1991
The solution is very simple add following parameter in “/etc/default/varnish
-a localhost:6081 or -a IP:6081
DAEMON_OPTS=”-a localhost:6081 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,256m”