Varnish command

Spread the love

Varnish is web application to increase web contents delivery time by cache. It can be installed in front of any servers with HTTP. Varnish is very fast, so it can speed up 300 to 1000 times faster.

Using Ubuntu, here’s varnish config file located:

vi /etc/varnish/default.vcl

After config varnish vcl file, you can test it using this command:

varnishd -C -f /etc/varnish/default.vcl

To varnish start / stop / restart:

service varnish start
service varnish stopĀ 
service varnish restart

To view varnish status:

service varnish status

In my case, varnish stopped working with no reason.
I found out that varnish disk was full, so I had to find out which file has the most big size.

du -h / | grep '[0-9\.]\+G'

And I narrow down and found varnish log file was too big.
After delete the file and start, it worked as normally.

Happy caching!
Bravo Varnish!

Facebook Comments

Published by

Titus Choi

I love technology. Working for information technology. Interested in AVR technology. Playing with RC stuff.