Browse Source

Added Pagespeed configuration

bugfixes
gau1991 10 years ago
parent
commit
c9f82fbd27
  1. 39
      ee/cli/templates/pagespeed-commom.mustache
  2. 21
      ee/cli/templates/pagespeed-global.mustache

39
ee/cli/templates/pagespeed-commom.mustache

@ -0,0 +1,39 @@
# PageSpeed Admin
location /ngx_pagespeed_statistics { include common/acl.conf; }
location /ngx_pagespeed_global_statistics { include common/acl.conf; }
location /ngx_pagespeed_message { include common/acl.conf; }
location /pagespeed_console { include common/acl.conf; }
location ~ ^/pagespeed_admin { include common/acl.conf; }
location ~ ^/pagespeed_global_admin { include common/acl.conf; }
# 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$" { }
# HTTPS Support
# pagespeed FetchHttps enable;
# PageSpeed Filters
# CSS Minification
# pagespeed EnableFilters combine_css,rewrite_css;
# JS Minification
# pagespeed EnableFilters combine_javascript,rewrite_javascript;
# Images Optimization
#pagespeed EnableFilters lazyload_images;
#pagespeed EnableFilters rewrite_images;
#pagespeed EnableFilters convert_jpeg_to_progressive,convert_png_to_jpeg,convert_jpeg_to_webp,convert_to_webp_lossless;
# Remove comments from HTML
#pagespeed EnableFilters remove_comments;
# Remove WHITESPACE from HTML
#pagespeed EnableFilters collapse_whitespace;
# CDN Support
#pagespeed MapRewriteDomain cdn.example.com www.example.com;

21
ee/cli/templates/pagespeed-global.mustache

@ -0,0 +1,21 @@
# Turning the module on and off
pagespeed on;
# Configuring PageSpeed Filters
pagespeed RewriteLevel PassThrough;
# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed MemcachedServers "127.0.0.1:11211";
pagespeed FileCachePath /var/ngx_pagespeed_cache;
# PageSpeed Admin
pagespeed StatisticsPath /ngx_pagespeed_statistics;
pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
pagespeed MessagesPath /ngx_pagespeed_message;
pagespeed ConsolePath /pagespeed_console;
pagespeed AdminPath /pagespeed_admin;
pagespeed GlobalAdminPath /pagespeed_global_admin;
# PageSpeed Cache Purge
pagespeed EnableCachePurge on;
pagespeed PurgeMethod PURGE;
Loading…
Cancel
Save