varnish and mod_pagespeed
Hugues Alary
hugues at betabrand.com
Wed Aug 14 05:46:50 CEST 2013
Hi there,
In order to save some time to people who might find this thread, here is
how to force mod_pagespeed to send a fully optimized version to varnish:
In your .vcl file:
sub vcl_recv() {
set req.http.X-PSA-Blocking-Rewrite = "whatever-you-want";
}
In your pagespeed configuration:
ModPagespeedBlockingRewriteKey "whatever-you-want"
It is worth noting that a feature meant to make reverse proxies like
varnish happy with mod_pagespeed is currently in beta, here is the relevant
link:
https://developers.google.com/speed/pagespeed/module/downstream-caching
-Hugues
Betabrand.com
On Thu, Jun 20, 2013 at 1:07 AM, Łukasz Rysiak <lury at critical.pl> wrote:
> David, please read this thread on google mps forum, where i described the
> same problem and got the solution from mps developers.
> https://groups.google.com/forum/#!topic/mod-pagespeed-discuss/j7X4uSckXlg
>
> You can add header which will force mps to do full optimisation before
> sending a response to varnish.
>
>
>
>
> Regards,
>
> Łukasz Rysiak
> Critical - Conversion Experts
> tel. 792 448 678
> http://critical.pl
>
>
>
> 2013/6/20 <me at ibotty.net>
>
> hi,
>>
>> > The problem is that varnish caches the first request - an unoptimized
>> > page. I wonder whether somebody has found a way to tell varnish to
>> > ignore the first request after the ttl is over and cache the second
>> > one?
>>
>> maybe you can configure mod_pagespeed to set a header when it is only
>> passing through the page.
>>
>> and i thought the recommended setup is to have mod_pagespeed before
>> varnish, but i've never set it up.
>>
>> good luck,
>> tobias florek
>>
>>
>> _______________________________________________
>> varnish-misc mailing list
>> varnish-misc at varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>>
>
>
> _______________________________________________
> 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/20130813/5d8e946c/attachment.html>
More information about the varnish-misc
mailing list