Questions tagged [varnish]

Varnish is an open source reverse HTTP proxy with extensive caching abilities, i.e. a web accelerator. It is frequently used in front of websites to cache webpages in memory.

This tag is for questions about Varnish Cache. Varnish cache is a reverse http proxy that caches, i.e. a web accelerator. It is open source software used to speed up websites.

2066 questions
10
votes
4 answers

Where is the varnish configuration file?

I have just installed varnish and its ready to serve web pages. Problem is that we are hitting open files limit. We have already set ulimit to varnish user. We want to find a file where we can write this configuration: # Maximum number of open…
khizar ansari
  • 1,476
  • 2
  • 18
  • 29
10
votes
2 answers

What is causing this 301 redirect?

I have a problem with my server redirecting http://www.mylesgray.com:8080/ -> http://www.mylesgray.com/. Here are my Nginx default and fastcgi_params config files: https://gist.github.com/1745271 https://gist.github.com/1745313 This is rather a…
Myles Gray
  • 8,711
  • 7
  • 48
  • 70
10
votes
3 answers

Using Django's CSRF-protection on views cached by Varnish

I have a Django view with a form that uses CSRF protection. I want this view to be cached by Varnish when there is a normal GET request (since all users need the same form, no login). So there are two challenges: How to cache this page in Varnish…
Anders E
  • 211
  • 3
  • 6
10
votes
1 answer

HAProxy with HTTP2 frontend and HTTP1.1 backend

I'm wondering if anyone has setup HAProxy with http2 support on the frontend and HTTP/1.1 on the backend The backend servers are currently Varnish so only support HTTP/1.1 Would http2 work in scenario were a persistent connection would be kept open…
Stephen Mahood
  • 101
  • 1
  • 8
10
votes
1 answer

How to make Cache Tagging work with FOSHttpCacheBundle and Varnish?

I configured Symfony and FOSHttpCacheBundle (following the Varnish configuration instructions in the FOSHttpCache documentation). I added an action to my controller that adds a test tag in the response HTTP header:
Michaël Perrin
  • 5,903
  • 5
  • 40
  • 65
9
votes
1 answer

Varnish + Static HTML Pages

I've recently come across a http web accelerator called Varnish. From what I've read, Varnish speeds up delivery of a website by optimizing every process of HTTP communication with the HTTP server using a reverse proxy configuration. My question is…
matsko
  • 21,895
  • 21
  • 102
  • 144
9
votes
3 answers

How to Set Varnish Cache-Control Headers

I am hoping someone can advise on the proper method for getting Varnish to send cache-control headers. Currently, my configuration is sending "Cache-Control: no-cache" to clients. Thanks in advance to anyone who might be able to help...
Kevin Gleeson
  • 113
  • 1
  • 1
  • 7
9
votes
3 answers

APC and Varnish

I am using varnish for reverse proxy and apc for op-code caching. Have anyone used both for same site ? Is there an overhead between compatibility between both ? My personal opinion is that both are not into each other domain but wanted a quick…
rahijain
  • 885
  • 1
  • 8
  • 10
9
votes
3 answers

Varnish and ESI, how is the performance?

Im wondering how the performance of th ESI module is nowadays? I've read some posts on the web that ESI performance on varnish were actually slower than the real thing. Say i had a page with over 3500 esi includes, how would this perform? is esi…
9
votes
1 answer

Change backend during retry in Varnish 4

I'd like to be able to change the backend on a retry in Varnish 4. We've got this working on a different (older) application using Varnish 3, but I haven't been able to figure it out for v4, nor find much documentation. The setup we want is to have…
Inukshuk
  • 187
  • 2
  • 13
9
votes
4 answers

Difference Between Varnish `(pipe)` and `(pass)`

I'm working with a varnish configuration I didn't write, and this configuration seems to use (pass) and (pipe) interchangeably. I'm a little unclear on what, exactly, the difference between these two actions is. The manual section on (pipe) is a…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
9
votes
2 answers

ESI includes in JSON response

I'm struggling getting ESI includes to be replaced in a JSON context. The following working correctly. Resulting in the ESI tag replaced by the actual contents. And this is not working. The ESI tag…
Bram Gerritsen
  • 7,178
  • 4
  • 35
  • 45
9
votes
2 answers

Varnish won't recognize req.grace variable

I have a fresh install of Slackware 64 14bit, and looking through Varnish installation documentation I have all the dependencies installed and compiled varnish with no error (make check passes all tests) Yet, when I try to run varnish using varnishd…
Renato Massaro
  • 544
  • 1
  • 8
  • 18
9
votes
4 answers

Install rst2man failed for varnish agent [fix]

I'm trying install varnish agent on ubuntu server using virtual box. There is a message in the middle installation process that say "you need rst2man installed to make dist". When I tried install rst2man using "sudo apt-get install rst2man" another…
Eko Bayu
  • 183
  • 1
  • 6
  • 19
9
votes
5 answers

How to inject environment variables in Varnish configuration

I have 2 environments variables : echo $FRONT1_PORT_8080_TCP_ADDR # 172.17.1.80 echo $FRONT2_PORT_8081_TCP_ADDR # 172.17.1.77 I want to inject them in a my default.vcl like : backend front1 { .host = $FRONT1_PORT_8080_TCP_ADDR; } But I got an…
manuquentin
  • 894
  • 1
  • 11
  • 19