Last active
May 13, 2017 10:07
-
-
Save shabarin/a32212ae12b05e91bbeee57aedb36d9f to your computer and use it in GitHub Desktop.
pagespeedngx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#server { | |
#... | |
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 StatisticsPath /ngx_pagespeed_statistics; | |
pagespeed MessagesPath /ngx_pagespeed_message; | |
pagespeed ConsolePath /pagespeed_console; | |
pagespeed AdminPath /pagespeed_admin; | |
pagespeed EnableFilters trim_urls; | |
pagespeed EnableFilters resize_rendered_image_dimensions; | |
pagespeed EnableFilters rewrite_css; | |
# | |
pagespeed RewriteRandomDropPercentage 0; | |
pagespeed FileCacheSizeKb 102400; | |
pagespeed FileCacheCleanIntervalMs 3600000; | |
pagespeed FileCacheInodeLimit 500000; | |
pagespeed RewriteDeadlinePerFlushMs 50; | |
pagespeed EnableCachePurge off; | |
pagespeed CacheFlushFilename cache.flush; | |
pagespeed CacheFlushPollIntervalSec 1; | |
pagespeed FetchHttps enable; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment