我剛剛在我的VPS服務器上爲apache安裝了mod_pagespeed。它有2 GB RAM和2 2.6 Ghz CPU。一切安好。但我無法配置過濾器JS CSS文件結合起來,如:關於mod_pagespeed&insight的配置
的style.css & second_style.css_等
這是我目前的pagespeed.conf文件。
LoadModule pagespeed_module modules/mod_pagespeed.so
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedFetchWithGzip on
SetOutputFilter DEFLATE
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeedRewriteLevel CoreFilters
ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedImageInlineMaxBytes 2048
ModPagespeedCssImageInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000
ModPagespeedEnableFilters lazyload_images,insert_dns_prefetch,combine_css,collapse_whitespace,resize_images,recompress_images,rewrite_javascript,resize_images,recompress_images,outline_css,inline_javascript,move_css_above_scripts,move_css_to_head,rewrite_css,elide_attributes,defer_javascript,
<FilesMatch "\.(jpg|jpeg|gif|png|js|css)$">
Header unset Etag
Header set Cache-control "public, max-age=600"
</FilesMatch>
<Location /mod_pagespeed_beacon>
SetHandler mod_pagespeed_beacon
</Location>
<Location /mod_pagespeed_statistics>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler mod_pagespeed_statistics
</Location>
ModPagespeedMessageBufferSize 100000
<Location /mod_pagespeed_message>
Allow from localhost
Allow from 127.0.0.1
SetHandler mod_pagespeed_message
</Location>
<Location /mod_pagespeed_referer_statistics>
Allow from localhost
Allow from 127.0.0.1
Allow from 78.191.55.81
SetHandler mod_pagespeed_referer_statistics
</Location>
如果我錯了?
此外,如果你檢查這個結果; http://j.mp/15sd296 Google對我有一些優惠:)
非常感謝。
只是我注意到的一個側面說明,它看起來像你的網站發送圖像和其他二進制格式與'''Content-Encoding:gzip'''頭。在這些文件上使用gzip是非常浪費的,因爲它們已經被壓縮了。 – Jud