Pagespeed öncesi;
Pagespeed sonrası;
Nginx pagespeed konusunda uzman biri değilim.
etc/nginx/sites-enable/
klasöründeki ayar dosyasında server {
altına aşağıdaki parametleri ekledim.
pagespeed on;
# Other settings
pagespeed HonorCsp on;
pagespeed PreserveUrlRelativity on;
pagespeed DisableRewriteOnNoTransform off;
pagespeed AllowVaryOn Auto;
pagespeed RespectVary on;
pagespeed XHeaderValue "maj_ngx_pagespeed";
# Filters
pagespeed RewriteLevel CoreFilters;
pagespeed EnableFilters insert_dns_prefetch;
pagespeed EnableFilters hint_preload_subresources;
pagespeed EnableFilters trim_urls;
pagespeed EnableFilters combine_heads;
pagespeed EnableFilters move_css_to_head;
pagespeed EnableFilters move_css_above_scripts;
pagespeed EnableFilters rewrite_style_attributes;
pagespeed EnableFilters outline_css;
pagespeed EnableFilters outline_javascript;
pagespeed EnableFilters jpeg_subsampling;
pagespeed EnableFilters convert_to_webp_animated;
pagespeed EnableFilters lazyload_images;
# Default PageSpeed location blocks
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; }
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
etc/nginx/nginx.conf
dosyasında http {
altına aşağıdaki parametreleri ekledim.
# Cache
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed EnableCachePurge on;
pagespeed FileCacheSizeKb 9437184;
pagespeed FileCacheCleanIntervalMs 86400000;
pagespeed FileCacheInodeLimit 1000000;
# Enable Admin Pages
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;
# Enable stats
pagespeed Statistics on;
pagespeed StatisticsLogging on;
pagespeed LogDir /var/log/pagespeed;
pagespeed MessageBufferSize 100000;
Pagespeed konusunda daha uzman biri var ise birlikte daha iyi bir iş yapabiliriz.