Created
March 20, 2015 09:29
-
-
Save annez/ded1d21999b790612dce to your computer and use it in GitHub Desktop.
Nginx pagespeed configuration
This file contains hidden or 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
pagespeed on; | |
# Needs to exist and be writable by nginx. Use tmpfs for best performance. | |
pagespeed FileCachePath /var/ngx_pagespeed_cache; | |
pagespeed EnableFilters combine_css,extend_cache,rewrite_images,lazyload_images,collapse_whitespace,inline_javascript,inline_css,local_storage_cache,prioritize_critical_css; | |
pagespeed EnableFilters rewrite_css,rewrite_javascript; | |
# 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$" { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment