Vanish and ngx_pagespeed conflict #177
Comments
Regarding the varnish and pagespeed not working, it's not that they're In terms of rewrites not working properly, what do you mean? What were you On Sun, Feb 24, 2013 at 1:53 PM, adamedoe notifications@github.com wrote:
Vid Luther |
Could you paste the headers you're serving your html with when varnish is off? So:
ngx_pagespeed should be serving the html with |
@vidluther when I was checking css and js, the content wasn't minified, so I assume something's wrong with rewrites. After a couple of refresh, css and js files combined nicely and got minified. @jeffkaufman here's the output of the code line :
Is it possible to make Varnish cache processed resources? Thanks! |
When pagespeed runs it replaces resource links in your html with ones to minified resources. So
The duplicate cache-control headers aren't ideal (ngx_pagespeed is setting the final one, elsewhere in your config you're setting the first cache-control and the pragma), but shouldn't be causing this problem. |
I was talking about the file's content. But it's working now :) It needed a couple of uses / refresh so that pagespeed compile it.
I'm aware of the double Control-Cache header. As they don't conflict, it's not a problem for now. Back to our issue. Is it possible to put pagespeed in front of Vanish? This will allow pagespeed to process the content AND to varnish to cache the result! Right? |
Sure, just have nginx call the pagespeed vhost, in other words, put nginx On Mon, Feb 25, 2013 at 4:29 PM, adamedoe notifications@github.com wrote: Is it possible to put pagespeed in front of Vanish? This will allow |
@vidluther how can I set it up? knowing that pagespeed needs many calls to fully render the page... |
Are you still having trouble with this? |
Yes, I still do. I can't figure out how to make Varnish cache only fully processed pages, OR, making it recheck the page and cache changes if applied... |
Unfortunately pagespeed was designed around the idea that the html it generates wouldn't be cached. Everything else can be longcached, but the html needs to be uncacheable. Here's an explanation I sent to ngx-pagespeed-discuss the other day: https://groups.google.com/d/msg/ngx-pagespeed-discuss/vzSq8XQPGmM/-h9L6bS2OoMJ |
Makes sense. |
Environment : Ubuntu 12.10
Nginx : 1.2.7
Varnish : 3.0.2
ngx_pagespeed is up and running. Every thing seems to be working properly, except for rewrite_css and rewrite_javascript. All CSS and JS files are kept as they are.
When I use Varnish with ngx_pagespeed, some filters stop working, like css and js combine.
Once I turn off Varnish, every gets back to normal.
Is there a conflict with Varnish and ngx_pagespeed?
How can I get Varnish to work with ngx_pagespeed?
How can I get rewrites to work properly?
If you need any log or file to investigate more, just ask :)
The text was updated successfully, but these errors were encountered: