htaccess redirects not working after a while
Guillaume Quintard
guillaume at varnish-software.com
Wed Jan 2 11:33:48 UTC 2019
Hi,
You can. Alternatively, if the SSL terminator is sending traffic to varnish
via another port, you can unconditionally hash the listening port:
hash_data(std.port(server.ip));
(don't forget to import std first)
--
Guillaume Quintard
On Thu, Dec 13, 2018 at 10:16 AM Miguel Gonzalez <miguel_3_gonzalez at yahoo.es>
wrote:
> 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 nucleus.be> 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: https://github.com/mattiasgeniar/varnish-6.0-configuration-templates/blob/master/default.vcl#L236-L238
>
>
> 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.
>
>
> Mattias
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20190102/4dc2598f/attachment.html>
More information about the varnish-misc
mailing list