I want to use Varnish
- On-Premise Server + WebMail Installations: Version 6.0 > Current Version
- Webmail Only Installations: Version 6.0 > Current Version
Speed up HTTP transactions
Varnish is a state-of-the-art, high-performance HTTP accelerator, used by sites such as Facebook and Twitter.
You can enable Varnish for your site by following these steps:
1.) Download Varnish from: http://sourceforge.net/projects/varnish/files/
2.) Untar, install:
3.) Open up your /usr/local/varnish/etc/varnish/default.vcl, and set this line block:
This will set the hostname and the port where your webserver will stay. This will be the connection details for your webserver. In this case, we will use a local webserver running on port 8080.
4.) Open up your Apache configuration file. Find:
5.) Change to your preferred alternate port:
6.) Restart Apache:
7.) Start Varnish:
To explain the settings briefly:
-a :80 defines the port for Varnish to run on.
-b localhost:8080 defines the port and host of the webserver you want to cache
-T localhost:8090 defines the port and host for the Varnish terminal to run in
-s file,/usr/local/varnish/varnish.cache,4G defines the cache file, and the size limit.
Congratulations! You now have Varnish running.
For more information about Varnish Cache, see: http://varnish-cache.org