Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (30 sloc) 1.176 kb

Using Varnish as frontend for Zotonic

Using the Varnish HTTP frontend, you can speed up your Zotonic even more as this web server caches static files intelligently.

Your Varnish config.vcl needs to define a backend for Zotonic:

backend zotonic {
  .host = "127.0.0.1";
  .port = "8000";
  .first_byte_timeout = 300s;
  .connect_timeout = 300s;
  .between_bytes_timeout = 300s;
}

Then, in vcl_recv, specify the Zotonic backend as the default backend:

sub vcl_recv {
  set req.http.X-Forwarded-Host = req.http.host;
  set req.backend   = zotonic;

  ...

Full varnish example configuration file

Please see the Varnish documentation for more information.

Auto-starting Varnish on Mac OSX

To automatically start Varnish on Max OSX, add the following plist file to launchd.

Jump to Line
Something went wrong with that request. Please try again.