you already modified /etc/default/varnish, but still not working?
then you have to edit following file
nano /lib/systemd/system/varnish.service
change :
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,1024m
sudo systemctl daemon-reload
sudo service varnish restart
to verify
>netstat -tulpn
you will find :
tcp6 0 0 :::80 :::* LISTEN 13609/varnishd
to check varnish log, simply run this command
> varnishlog
you will see something like this
– RespHeader X-Frame-Options: SAMEORIGIN
– RespHeader Content-Encoding: gzip
– RespHeader Vary: Accept-Encoding
– RespHeader X-Varnish: 138661
– RespHeader Age: 0
– RespHeader Via: 1.1 varnish (Varnish/5.0)
– VCL_call DELIVER
– VCL_return deliver
– Timestamp Process: 1532491444.430815 0.679875 0.000023
– RespHeader Accept-Ranges: bytes
– Debug “RES_MODE 4”
– RespHeader Connection: close
Comments are closed.