我们使用ubuntu14.04和nginx1.6.2,最近为了使用http2,我将服务器从ubuntu升级到16.04,nginx升级到1.10.0,效果非常好。
并测试了用分页模块(1.11.33.4)编译nginx,并进行了比较
但是我发现option2比option1慢(ex: option1: 7s和option2: 13~14 s),我尝试如下设置:
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和分页模块不能正常工作?
发布于 2017-05-25 08:45:00
尝试设置docs页面建议的值:support
https://stackoverflow.com/questions/44152097
复制相似问题