Global navigation

   Documentation Center
   eZ Studio & eZ Platform
     User Manual
     Technical Manual
     Glossary
   eZ Publish 4.x / legacy

 
eZ Publish (5.x)

eZ Publish 5.x | For eZ Platform & eZ Studio topics see Technical manual and User manual, for eZ Publish 4.x and Legacy topics see eZ Publish legacy

Skip to end of metadata
Go to start of metadata

eZ Publish 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 eZ Publish 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 eZ Publish

Update your Virtual Host

On apache:

my_virtualhost.conf

On nginx:

mysite.com

Update YML configuration

ezpublish.yml

Previous versions

  • No labels

6 Comments

  1. Unknown User (desorden)

    Shouldn't we maitain following if from the varnish default.vcl in our ezpublish.vcl?

    https://www.varnish-cache.org/trac/browser/bin/varnishd/default.vcl?rev=3.0#L59

    If removed, i have problems with post requests, example, sending data in a contact form... 

  2. Unknown User (desorden)

    Out of scope of ez5 itself, but if you need to install Varnish Curl Vmod, there is a good tutorial here (for Debian)

    http://lassekarstensen.wordpress.com/2013/07/29/building-a-varnish-vmod-on-debian/

    It uses another module but the process is the same for all modules. 

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

  4. Unknown User (peterkeung)

    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.

  5. Peter: Added, thanks!

  6. Unknown User (msanchez)

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

    i. e:

    ezpublish:
        system:
            my_siteaccess_group:
                http_cache:
                    purge_servers: [http://user:password@my.varnish.server]