Hacker News new | ask | show | jobs
by sandGorgon 4267 days ago
I have never tried but failed miserably in trying to setup a Varnish front-end for a wordpress setup - especially with pretty urls. The hard part was getting varnish to work with the admin interface - especially image uploads - and comments.

Do you know of any good starting config file that can be used ?

2 comments

A couple of resources for Varnish 3:

* https://github.com/mattiasgeniar/varnish-3.0-configuration-t... (fairly well maintained with CMS specific VCL examples)

* https://github.com/slashsBin/nuCache (library for different programming languages, not so CMS centric)

Both of these are listed in our utilities directory:

* https://www.varnish-cache.org/utilities

Other Varnish (VCL) extensions can be found in the VMOD directory:

* https://www.varnish-cache.org/vmods

If you have ideas on how to make both these resource more visible and accessible for our users, please let me know.

@ruben_varnish - this is great ! thanks.

I think it would be great if varnish had an official repo with different configuration templates for different stacks that could be used as "drop-in".

For example, my question about a fairly basic Rails config (https://news.ycombinator.com/item?id=8431927) had a couple of different answers disagreeing about stuff.

Also, things like SSL termination are something that the documentation skips over entirely - I understand completely that Varnish does not implement it, but Varnish necessitates the introduction of certain other players in the stack, which it should document.

For example, a canonical example of varnish setup as Nginx (SSL termination) -> Varnish -> Nginx (reverse proxy) -> App would be very useful.

It's not difficult. You have to exclude (pass or pipe) either POST and /wp-admin OR all requests with wordpress logged in cookies. That's the basics of it. Also the resources Ruben listed are super great.

hit me on twitter @kentonjacobsen