Building a Varnish VMOD
Building a Varnish VMOD in ubuntu is bit complicated process. we are going to use varnish-3.0.5. For VMOD we are going to use https://github.com/varnish/libvmod-shield.
Lets create a folder and get the varnish’s source code.
apt-get source varnish
Then we will create a make file from the source
Then we will get code from https://github.com/varnish/libvmod-shield and install the VMOD
git clone https://github.com/varnish/libvmod-shield.git
This will install VMOD shield.
If you see the following error
cannot open shared object file: No such file or directory
then you need to symlink the VMOD in the /usr/local/lib/varnish/vmods/ to /usr/lib/x86_64-linux-gnu/varnish/vmods/libvmod_shield.so
ln -s /usr/local/lib/varnish/vmods/libvmod_shield.so /usr/lib/x86_64-linux-gnu/varnish/vmods/libvmod_shield.so
Now you can use shield in you vcl.