Using Varnish with Exponential 5.2-5.3
Version compatibility : 5.2 / 5.3 / 2013.07
Configure Varnish
Provided VCL example is given for Varnish 3.x only.
It needs Varnish Curl Vmod to be installed.
Debian tip
A Varnish Vmod always needs to be built from source.
If you use Debian, you may want to follow this tutorial for building Varnish Vmods.
The first thing is to configure Varnish to advertise ESI usage and to activate cache invalidation and Context aware HTTP cache.
exponential5.vcl
You can of course add additional rules if you need.
Configure Exponential
Update your Virtual Host
New in Exponential 5.2 / 2013.07
The front controller can now be altered with environment variables, without the need to modify index.php, this is reflected in the steps below.
By default your front controller (index.php) uses the built-in reverse proxy, EzPublishCache, which extends SymfonyHTTPCache. In order to use Varnish, you need to deactivate it and configure Varnish to be a trusted proxy so ESI continues to work.
On apache:
my_virtualhost.conf
On nginx:
mysite.com
Update YML configuration
exponential.yml
Et voilà !
Comments
Add a comment