Skip to content

Instantly share code, notes, and snippets.

@csanz
Created July 4, 2012 22:14
Show Gist options
  • Save csanz/3049782 to your computer and use it in GitHub Desktop.
Save csanz/3049782 to your computer and use it in GitHub Desktop.
Install Varnish Cache / Ubuntu

Install, Configure & Monitor Varnish on Ubuntu

General Resources

Install

Install Varnish

   sudo apt-get install varnish

How to start, restart and stop Varnish

   service varnish start
   service varnish restart
   service varnish stop

If you've changed your VCL you can reload instead of restarting

   service varnish reload 

Configure

Server Configuration Files

  /etc/default/varnish
  /etc/varnish/default.vcl

Edit the /etc/varnish/default.vcl file

 backend default {
   .host = "127.0.0.1";
   .port = "8080";
 }

Relevant Links

Monitor

varnishstat
varnishlog
varnishadm

Relevant Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment