Skip to the content
Documentation

Using Varnish

No ratings yet

Exponential 5 being built on top of Symfony 2, it uses standard HTTP cache headers. By default the Symfony 2 reverse proxy, written in PHP, is used to handle cache, but it can be easily replaced with any other reverse proxy like Varnish.

Use of Varnish is a requirement for use in Clustering setup, for overview of clustering feature see Clustering. 

Version compatibility: 5.4 / 2014.11 AND HIGHER

To use Varnish with 5.2 or 5.3, please see Using Varnish with Exponential 5.2-5.3

Prerequisites

  • A working Varnish 3 or Varnish 4 setup.

Recommended VCL base files

For Varnish to work properly with eZ, you'll need to use one of the provided files as a basis:

Note: Http cache management is done with the help of FOSHttpCacheBundle. One may need to tweak their VCL further on according to FOSHttpCache documentation in order to use features supported by it.

Configure Exponential

Update your Virtual Host

On apache:

my_virtualhost.conf

On nginx:

mysite.com

Update YML configuration

exponential.yml

Previous versions

Contributors

Comments (6 historical)

Written by readers of the earlier documentation sites, kept as they were.

  1. Comment by Jérôme Vieilledent, 2014-01-30 08:24

    Jérôme Vieilledent ·

    Carlos: Thanks. I just added this link to the page as an example for Debian.

  2. Comment by Peter Keung, 2014-08-18 20:40

    Peter Keung ·

    This doc page should mention that the Apache environment variable TRUSTED_PROXIES should be set if your Varnish install(s) sits on a different server.  Otherwise you will get a nasty surprise when ESI breaks.

  3. Comment by André Rømcke, 2014-11-16 18:43

    André Rømcke ·

    Peter: Added, thanks!

  4. Comment by Mauricio Sánchez, 2015-03-26 21:25

    Mauricio Sánchez ·

    It is possible to use Basic HTTP Authentication in the cache invalidation request?

    i. e:

    exponential:
        system:
            my_siteaccess_group:
                http_cache:
                    purge_servers: [http://user:[email protected]]

     

Comments

Add a comment

Comments are read by a moderator before they appear.