Lately I’ve been doing a lot of work with Varnish, this includes testing it within a load balanced environment, putting it behind nginx, putting it in front of Solr, the list goes on.
This blog post will hopefully give you an insight in to a simple way of combining nginx, Varnish and Apache to create a powerful Wordpress environment that can really take a hammering.
I’m going to assume you already have Apache and nginx working together, if not I suggest you read my other articles on these subjects to learn how to combine them.
Installing Varnish
sudo apt-get install varnish
Configuring Apache
I suggest binding Apache to port 81, this is easy to change, open the following file in your favourite editor.
/etc/apache2/ports.conf
Change the Listen and NameVirtualHost lines to:
Listen 81
NameVirtualHost *:81
This will mean you need to go and change all …