Manual talk:Varnish caching

if-none-match support added?
Given this changeset purportedly added support, should we remove the section on "if-none-match" in vcl_recv? GreenReaper 04:14, 9 August 2010 (UTC)

The advice here, helped, but I had a lingering problem with 127.0.0.1 in my recent changes. adding

remove req.http.X-Forwarded-For; set   req.http.X-Forwarded-For = client.ip;

to my vcl_recv seemed to do the trick. Cariaso 18:55, 9 July 2011 (UTC)

Varnish 3.0
The Varnish 3.0 package on Ubuntu installs the initial config file under /etc/default/varnish. It also requires you to explicitly state "return" - such as:

return(lookup);

More info and a few other things (like "purge_url" is now "ban_url"):

Upgrading from Varnish 2.1 to 3.0

Varnish 3.0 config file example?
Hi, where can I get a *good* example of a varnish 3.0 configuration file? The one on the manual did not helped me. Another question: what should one insert/replace for "^images.example.org$"? A subdomain of my domain where all images are stored?

Thank you and best regards, --Mrnett1974 17:15, 21 January 2012 (UTC)


 * The "images" server only applies to a site where the content is split among multiple webservers on different domains, with (typically) the most obsolete hardware (P4, Celeron...) and small, low-powered server software (lighttpd, nginx) used to serve images and static content while more powerful servers handle the database, Apache and dynamic wiki content. A site using a content delivery network would need this - in Wikimedia's case, the image servers are on 'upload.wikimedia.org' and the wiki is on '*.wikipedia.org'. If your site doesn't need it (and many single-server sites do not), don't use it. --Carlb (talk) 21:17, 24 February 2012 (UTC)

Purge updated pages with Varnish 2.x
I'm using MW 1.19.0 and Varnish 2.1.5. Automatic purging of updated pages did not work until I applied the patch described in  this post. For your convenience, here's my patch adapted from the one in the above post:

Varnish 4 purging
I don't think the vcl_hit/vcl_miss is necessary the official documentation describes a new way to do it using. Daniel Friesen (Dantman) (talk) 01:56, 1 March 2015 (UTC)

Varnish 4.x not working & mobile example?
Hi! I refer to my question on serverfault.com (where i asked because i thought it was an error from me :)), but it seems, that the example Varnish 4.x configuration doesn't work and has an error. After uncommenting this directive:

pages are cached by varnish. Before that the backend delivered the actual page. Now the question: Why was this directive added? What should it do?

And another question: Can anyone give an example how to handle requests from mobile devices, if MobileFrontend is installed? I couldn't find any examples (and not the implementation of the wmf?)? Best, Florianschmidtwelzow (talk) 23:37, 10 May 2015 (UTC)

purging does not work with Varnish 4
https://www.mediawiki.org/wiki/Manual:Varnish_caching#Configuring_Varnish_4.x

If you use the above setting before 8/17/2015 and have MW server separate from Varnish server. The purging function does not work at all. --Zoglun (talk) 20:52, 17 August 2015 (UTC)