【问题标题】:Http2 need PageSpeed Module?Http2需要PageSpeed模块吗?
【发布时间】:2017-10-24 10:15:03
【问题描述】:

我们使用 ubuntu 14.04 和 nginx 1.6.2, 最近为了使用http2,我把我们的服务器从Ubuntu升级到16.04,nginx升级到1.10.0,效果很好。

我测试用pagespeed模块(1.11.33.4)编译nginx,并比较

  1. http2
  2. http2+pagespeed

但是我发现option2比option1慢(ex: option1: 7s and option2: 13~14s), 我尝试以下设置:

pagespeed on;

# Needs to exist and be writable by nginx.  Use tmpfs for best performance.
pagespeed FileCachePath /var/ngx_pagespeed_cache;

# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
  add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }

或多加一行:

pagespeed RewriteLevel CoreFilters;

但两者都很慢,我的设置配置有什么问题吗?还是 http2 和 pagespeed 模块不能正常工作?

【问题讨论】:

    标签: nginx ubuntu-16.04 http2 mod-pagespeed


    【解决方案1】:

    尝试设置文档页面建议的值: https://modpagespeed.com/doc/https_support

    【讨论】:

      猜你喜欢
      • 2021-06-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-15
      • 2023-03-19
      相关资源
      最近更新 更多