This document describes how to install and configure nuCache as Varnish VCL Configurations on Deb-based distros. Please keep in mind that some commands may need root user privileges.
For those who are eager, there is a quick 2-step brief guide on README.md, here is a longer descriptive one:
-
Backup Varnish dist files
$ mv /etc/varnish /etc/varnish.nuCacheSave $ mv /etc/default/varnish /etc/default/varnish.nuCacheSave
-
Copy/Clone nuCache files to
/etc/varnish
$ cd $ curl -LO https://github.com/slashsBin/nuCache/archive/v1.1.1.tar.gz $ tar -xzf v1.1.1.tar.gz $ mv nuCache-1.1.1 /etc/varnish # OR $ git clone https://github.com/slashsBin/nuCache.git /etc/varnish
-
Use
etc/daemon
file as VarnishD Daemon Config file:$ ln -s /etc/varnish/etc/daemon /etc/default/varnish
-
Configure Storage Type/Size as desired:
$ vim /etc/default/varnish # Look for lines starting with VARNISH_STORAGE # You can tweak other settings too!
-
Start VarnishD:
$ service varnish restart
-
Enjoy!