htaccess redirects not working after a while

Miguel Gonzalez miguel_3_gonzalez at
Thu Dec 13 09:14:38 UTC 2018

 I use Varnish 4.1, can I just add in the vcl_hash this?

|  # Cache the HTTP vs HTTPs separately |
|  |  if (req.http.X-Forwarded-Proto) { |
|  |  hash_data(req.http.X-Forwarded-Proto); |
|  |  } |


    En jueves, 13 de diciembre de 2018 10:05:20 CET, Mattias Geniar <mattias at> escribió:  
 > Here you have it:

You are not caching the protocol (http or https), which will lead to different caching results depending on the backend response.

As an example, have a look here: 

In your Apache proxy config you can set additional headers to mark they've been passed through it (in this example, X-Forwarded-Proto) so Varnish knows to treat them differently.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-misc mailing list