简体   繁体   English

如何配置HTTPS Nginx + Pagespeed + Varnish + Apache?

[英]How to configure HTTPS Nginx + Pagespeed + Varnish + Apache?

I currently have the following set-up: 我目前有以下设置:

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

I want to add mod_pagespeed or nginx pagespeed in the mix. 我想在混合中添加mod_pagespeed或nginx pagespeed。 Any ideas where to add it? 任何想法在哪里添加它? Should I look into adding pagespeed to Apache or to Nginx? 我应该考虑将pagespeed添加到Apache还是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 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 将pagespeed添加到nginx,使pagespeed使用来自清漆/ apache的缓存页面并即时执行
  • Add pagespeed to Apache, and configuring it in such a way that the pages get cached based on user agent / screen resolution. 将pagespeed添加到Apache,并对其进行配置,以便根据用户代理/屏幕分辨率对页面进行缓存。

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! 先谢谢您的帮助!

If Apache is doing the processing of PHP then I would use that for pagespeed. 如果Apache正在处理PHP,那么我将其用于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. 使用Varnish的想法是快速提供缓存的内容,如果您使用nginx pagespeed修改所有缓存的内容,我无法想象这是一个好主意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM