1

I currently have the following set-up:

Nginx (https) => ssl offloaded => Varnish (http) => Apache (http)

I want to add mod_pagespeed or nginx pagespeed in the mix. Any ideas where to add it? Should I look into adding pagespeed to Apache or to Nginx?

The following page has some information, but I'm unsure what to do with our specific set-up.

https://developers.google.com/speed/pagespeed/module/downstream-caching

I was thinking of exploring one of the following options:

  • Add pagespeed to nginx, making pagespeed use the cached pages from varnish / apache and executing on the fly
  • Add pagespeed to Apache, and configuring it in such a way that the pages get cached based on user agent / screen resolution.

If I understand correctly, the artice I point out above refers to the second option. It might be easier to set up the first option though I think?

Thanks in advance for the help!

Milan Simek
  • 432
  • 4
  • 12

2 Answers2

1

Perhaps something along these lines could work for you?

HAProxy --> Varnish --> Nginx

http://arstechnica.co.uk/information-technology/2015/05/web-served-how-to-make-your-site-all-https-all-the-time-for-everyone/

  • I'm already using Nginx as a reverse proxy, so no need to add HAProxy. My question is how to add Google Page Speed in the mix with my current set-up. Any ideas? – Milan Simek Jan 24 '16 at 22:45
1

If Apache is doing the processing of PHP then I would use that for pagespeed. The idea with Varnish is to serve the cached content quickly, if you use nginx pagespeed to remodify all of the cached content I can't imagine that is a good idea.

Mike Andreasen
  • 379
  • 2
  • 11