0

I just installed mod_pagespeed for apache on my VPS server. It has 2 GB RAM, and 2 2.6 Ghz CPUs. Everything is fine. But I can't configure filters to combine JS CSS files like:

style.css&second_style.css_ etc.

Here is my current pagespeed.conf file.

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>

Where i am Wrong ?

Also if you check this results ; http://j.mp/15sd296 Google have some offers for me :) enter image description here

Thank you so much.

Jud
  • 552
  • 4
  • 9
Fatih Toprak
  • 1,097
  • 1
  • 19
  • 48
  • Just a side note of something I noticed, it looks like your site is sending images and other binary formats with ```Content-Encoding: gzip``` headers. Using gzip on these files is wasteful as they are already compressed. – Jud Jun 22 '13 at 16:47

3 Answers3

1

Looking at your site, I don't see that mod_pagespeed is able to rewrite any resources (images, js, css, etc.). Can you check your apache error_log file to see if there are any relevant messages being generated by mod_pagespeed? If you don't see anything, try setting LogLevel info in your apache conf file and restarting.

Often when mod_pagespeed is not able to rewrite a resource it is because it failed to fetch it. If this is indeed the issue, the best solution is to configure ModPagespeedLoadFromFile if your environment allows it. This allows mod_pagespeed to bypass serf, the HTTP fetcher it uses, and load files directly from disk.

Jud
  • 552
  • 4
  • 9
1

I don't think you are actually hitting your filters, you are using the Corefilters

ModPagespeedRewriteLevel CoreFilters

If you want to use custom filters

ModPagespeedRewriteLevel PassThrough

https://developers.google.com/speed/pagespeed/module/config_filters

Lee Woodman
  • 1,319
  • 2
  • 16
  • 30
  • This is not correct. If you enable CoreFilters you will hit all the filters in the ModPagespeedEnableFilters directive along with CoreFilters. If you set PassThrough it will not activate the CoreFilters and only enable the filters in the ModPagespeedEnableFilters directive. – DD. Nov 19 '14 at 00:18
1

Do you have a closing

</IfModule> 

? I don't see it in the configuration you have posted.

df2k2
  • 178
  • 6