LoadModule version_module /usr/lib64/apache2/modules/mod_version.so
</IfModule>
<IfVersion < 2.4>
LoadModule pagespeed_module /usr/lib64/apache2/modules/mod_pagespeed.so
</IfVersion>
<IfVersion >= 2.4.2>
LoadModule pagespeed_module /usr/lib64/apache2/modules/mod_pagespeed_ap24.so
</IfVersion>
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedRespectVary on
ModPagespeedDisableRewriteOnNoTransform off
ModPagespeedRewriteLevel PassThrough
ModPagespeedEnableFilters combine_css,extend_cache,rewrite_images
ModPagespeedEnableFilters rewrite_css,rewrite_javascript
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
<Location /mod_pagespeed_beacon>
SetHandler mod_pagespeed_beacon
</Location>
<Location /mod_pagespeed_statistics>
Order allow,deny
Allow from localhost
SetHandler mod_pagespeed_statistics
</Location>
</IfModule>
System specs
CENTOS 7.3 x86_64
WHM 60.0.35
Easyapache 4
/etc/apache2/conf.modules.d/456_pagespeed.conf
/usr/lib64/apache2/modules/mod_pagespeed.so
X-Mod-Pagespeed: 1.11.33.4-0
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedEnableFilters combine_css
</IfModule> --
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/32a65c5c-907a-4301-9a1b-1af79e205191%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thank you so much for the answer @Otto van der Schaaf. I have spent the whole day and night to figuring it out but still no success.
Mod_pagespeed is inserting code <script data-pagespeed-no-defer>//<![CDATA[... ("data-pagespeed-url-hash") in https://deemasfashion.co.uk/ but not combining CSS and JS files.
<IfModule pagespeed_module>
ModPagespeed on
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeedEnableFilters combine_css
ModPagespeedEnableFilters combine_javascript
</IfModule>
<IfModule !mod_version.c> LoadModule version_module /usr/lib64/apache2/modules/mod_version.so</IfModule>
<IfVersion < 2.4.2> LoadModule pagespeed_module /usr/lib64/apache2/modules/mod_pagespeed.so</IfVersion><IfVersion >= 2.4.2> LoadModule pagespeed_module /usr/lib64/apache2/modules/mod_pagespeed_ap24.so</IfVersion>
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedRespectVary off
ModPagespeedEnableFilters combine_css
ModPagespeedEnableFilters combine_javascript
# ModPagespeedCriticalImagesBeaconEnabled false
# ModPagespeedCombineAcrossPaths off
ModPagespeedMaxSegmentLength 1024
ModPagespeedDisableRewriteOnNoTransform off
# ModPagespeedModifyCachingHeaders off
# ModPagespeedListOutstandingUrlsOnError on
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedImgInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/a6178a5d-7dc4-441a-b09e-1c682d9536eb%40googlegroups.com.
ModPagespeedDomain https://deemasfashion.co.uk
and permit https fecht with
ModPagespeedFetchHttps enable
--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/9ed82a76-d716-4a0d-b245-b0c182c604fc%40googlegroups.com.
ModPagespeed on
ModPagespeedRespectVary off
ModPagespeedRewriteLevel PassThrough
ModPagespeedEnableFilters combine_css,convert_meta_tags
ModPagespeedEnableFilters combine_javascript,convert_jpeg_to_progressive
ModPagespeedMaxSegmentLength 1024
ModPagespeedDisableRewriteOnNoTransform off
ModPagespeedModifyCachingHeaders off
ModPagespeedListOutstandingUrlsOnError on
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
ModPagespeedFetchHttps enable
ModPagespeedDomain https://jaktorch.com
ModPagespeedDomain https://deemasfashion.co.uk
ModPagespeedMapOriginDomain http://localhost https://deemasfashion.co.uk
ModPagespeedSslCertDirectory /var/cpanel/ssl/installed/certs
ModPagespeedSslCertFile /var/cpanel/ssl/installed/certs/jaktorch_com_9fca6_0.crt
<Directory /var/mod_pagespeed/cache>
<FilesMatch "\.(html|htm)$">
Header unset Etag
Header set Cache-control "max-age=0, no-cache"
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|gif|png|js|css)$">
Header unset Etag
Header set Cache-control "public, max-age=600"
</FilesMatch>
</Directory><IfModule mod_rewrite.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 10 minutes"
ExpiresByType image/jpeg "access plus 10 minutes"
ExpiresByType image/gif "access plus 10 minutes"
ExpiresByType image/png "access plus 10 minutes"
ExpiresByType image/png "access plus 10 minutes"
ExpiresByType text/css "access plus 10 minutes"
ExpiresByType text/x-javascript "access plus 10 minutes"
# END Cache-Control Headers
</IfModule>
<FilesMatch "\.(ico|pdf|flv)$">
Header set Cache-Control "max-age=600, public"
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=600, public"
</FilesMatch>
<FilesMatch "\.(xml|txt|css|js)$">
Header set Cache-Control "max-age=600, public"
</FilesMatch>
<FilesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=600, public"
</FilesMatch>ModPagespeedDomain http?://jaktorch.com
ModPagespeedDomain http?://deemasfashion.co.uk
Headers for caching differ on jacktorch.com and deemasfashion.co.uk
jacktorch.com
<FilesMatch "\.(html|htm|php)$">
Header set Cache-Control "max-age=600, public"
</FilesMatch>
ModPagespeedEnableFilters rewrite_css
ModPagespeedEnableFilters rewrite_images
ModPagespeedEnableFilters rewrite_javascript
and use the same cache and expires headers config in in both sites.
.... and I am curious.... why make short time cache in statics resources?
ModPagespeedDomain http?://jaktorch.com
Mod0PagespeedDomain http?://deemasfashion.co.uk
must be
ModPagespeedDomain http*://jaktorch.com
Mod0PagespeedDomain http*://deemasfashion.co.uk
and I suggest you to replace this
ModPagespeedMapOriginDomain http://localhost https://deemasfashion.co.uk
to
pagespeed LoadFromFileMatch "^https?://deemasfashion.co.uk/" "/path/to/root/web/files";pagespeed LoadFromFileMatch "^https?://jacktorch.com/" "/path/to/root/web/files"; pagespeed LoadFromFileRuleMatch disallow .*; pagespeed LoadFromFileRuleMatch allow \.css$; pagespeed LoadFromFileRuleMatch allow \.jpe?g$; pagespeed LoadFromFileRuleMatch allow \.png$; pagespeed LoadFromFileRuleMatch allow \.gif$; pagespeed LoadFromFileRuleMatch allow \.js$;
and any line plus to any file extension you need
deemasfashion.co.uk and the .httacces for jaktorch.com, but sure you have a vhost config for jaktorch.com and a .httacces for deemasfashion.co.uk, perhaps differences in these 4 files may they explain the differences between the config you post here and the headers I see.
To simplify, why don´t put the cache and expire headers in a commun place of the config files?. In this way you ensure al files of same type have the same headerss
Hello
I am using Jaktorch.com for experiments so its serving both HTTP and HTTPS. Otherwise there will be only one version present that is HTTPS.
I have inserted same Cache code for both domains (and both versions HTTP and HTTPS ) in Virtual Host and removed it from .htccess.
As you suggested, I have added below filtersModPagespeedEnableFilters rewrite_css,rewrite_images,rewrite_javascript
ModPagespeedMaxCombinedCssBytes 5000000
ModPagespeedMaxCombinedJsBytes 5000000I am using wordpress CMS, so there are many folders where CSS, JS and jpgs are located. Still you think that i should apply the below code snipet?/home/public_html/wp-content/uploads/2017/01/
/home/public_html/wp-content/themes/my-theme/
/home/public_html/wp-content/themes/my-theme/CSS/
/home/public_html/wp-content/themes/my-theme/js/
/home/public_html/wp-content/plugins/my-plugins/assets/css
/home/public_html/wp-content/plugins/my-plugins/assets/ja
and 4 to 5 moreI will insert this code tonightpagespeed LoadFromFileMatch "^https?://deemasfashion.co.uk/" "/home/public_html/wp-content/"pagespeed LoadFromFileMatch "^https?://jacktorch.com/" "/home/public_html/wp-content/"
pagespeed LoadFromFileRuleMatch disallow .*pagespeed LoadFromFileRuleMatch allow \.css$pagespeed LoadFromFileRuleMatch allow \.jpe?g$pagespeed LoadFromFileRuleMatch allow \.png$pagespeed LoadFromFileRuleMatch allow \.gif$pagespeed LoadFromFileRuleMatch allow \.js$
<IfModule !mod_version.c>
LoadModule version_module /usr/lib64/apache2/modules/mod_version.so
</IfModule>
<IfVersion < 2.4>
LoadModule pagespeed_module /usr/lib64/apache2/modules/mod_pagespeed.so
</IfVersion>
<IfVersion >= 2.4.2>
LoadModule pagespeed_module /usr/lib64/apache2/modules/mod_pagespeed_ap24.so
</IfVersion>
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedRespectVary off
ModPagespeedEnableFilters combine_css,rewrite_css,rewrite_images
ModPagespeedEnableFilters combine_javascript,rewrite_javascript
ModPagespeedMaxSegmentLength 1024
ModPagespeedDisableRewriteOnNoTransform off
ModPagespeedModifyCachingHeaders off
ModPagespeedListOutstandingUrlsOnError on
ModPagespeedMaxCombinedCssBytes 5000000
ModPagespeedMaxCombinedJsBytes 5000000
# output handler.
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
# The ModPagespeedFileCachePath and
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
# Override the mod_pagespeed 'rewrite level'. The default level
ModPagespeedRewriteLevel PassThrough
# ModPagespeedDomain
ModPagespeedFetchHttps enable
ModPagespeedDomain http://jaktorch.com
ModPagespeedDomain https://jaktorch.com
ModPagespeedDomain http://deemasfashion.co.uk
ModPagespeedDomain https://deemasfashion.co.uk
ModPagespeedMapOriginDomain http://localhost https://deemasfashion.co.uk
ModPagespeedSslCertDirectory /var/cpanel/ssl/installed/certs
ModPagespeedSslCertFile /var/cpanel/ssl/installed/certs/jaktorch_com_9fca6_0207d_1488239999_ad703b214768c8358462af7ddf19bc91.crt
ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedImgInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000
ModPagespeedStatistics on
ModPagespeedStatisticsLogging on
ModPagespeedLogDir /var/log/pagespeed
<Location /pagespeed_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_admin
</Location>
<Directory /var/mod_pagespeed/cache>
<FilesMatch "\.(html|htm)$">
Header unset Etag
Header set Cache-control "max-age=0, no-cache"
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|gif|png|js|css)$">
Header unset Etag
Header set Cache-control "public, max-age=600"
</FilesMatch>
</Directory>pagespeed LoadFromFileMatch "^https?://deemasfashion.co.uk/" "/path/to/root/web/files";pagespeed LoadFromFileMatch "^https?://
jacktorch.com/" "/path/to/root/web/files"; pagespeed LoadFromFileRuleMatch disallow .*; pagespeed LoadFromFileRuleMatch allow \.css$; pagespeed LoadFromFileRuleMatch allow \.jpe?g$; pagespeed LoadFromFileRuleMatch allow \.png$; pagespeed LoadFromFileRuleMatch allow \.gif$; pagespeed LoadFromFileRuleMatch allow \.js$;
must beModPagespeedLoadFromFile "^https?://deemasfashion.co.uk/" "/path/to/root/web/files";ModPagespeedLoadFromFile "^https?://jacktorch.com/" "/path/to/root/web/files";ModPagespeedLoadFromFileRuleMatch disallow .*;ModPagespeedLoadFromFileRuleMatch allow \.css$;ModPagespeedLoadFromFileRuleMatch allow \.jpe?g$;ModPagespeedLoadFromFileRuleMatch allow \.png$;ModPagespeedLoadFromFileRuleMatch allow \.gif$;ModPagespeedLoadFromFileRuleMatch allow \.js$;
I am using
wordpress CMS, so there are many folders where CSS, JS and jpgs are
located. Still you think that i should apply the below code snipet?
home/public_html/wp-content/uploads/2017/01/
/home/public_html/wp-content/themes/my-theme/
/home/public_html/wp-content/themes/my-theme/CSS/
/home/public_html/wp-content/themes/my-theme/js/
/home/public_html/wp-content/plugins/my-plugins/assets/css
/home/public_html/wp-content/plugins/my-plugins/assets/jsand 4 to 5 more
Where do you put these paths?
I you refer to use it in ModPagespeedLoadFromFileRuleMatch sentences, no. In therse sentences you put file extensions not paths to files.
You say "All content coming from HTTPS, Should i change HTTPS to HTTP in content (like CSS, JS and JPS etc)?"
For this: No. You can acces an HTTP site with HTTPS resources w/o problems bu if you acces an HTTPS site that had HTTP resources (css, img,js...) you get an error of mixed content an in most browser cannot display, thus if your 1s. site is HTTPS resources must be HTTPS too.
Most of the problems come from don´t have cache headers or have it incacheable, I wouls say ALL resources mus have at least this
Header set Cache-control "public, max-age=600"
If you put resources with
Header set Cache-control "max-age=0, no-cache"
you get errors like
<!--Uncacheable content, preventing rewriting of...
<Directory /var/mod_pagespeed/cache>
<FilesMatch "\.(html|htm)$">
Header unset Etag
Header set Cache-control "max-age=0, no-cache"
</FilesMatch>
<FilesMatch "\.(jpg|jpeg|gif|png|js|css)$">
Header unset Etag
Header set Cache-control "public, max-age=600"
</FilesMatch>
</Directory>
These cache control headers are set for files in /var/mod_pagespeed/cache where are cache control hearers for files in /home/public_html/ ?
Thanks you so much @Longinos.
<IfModule pagespeed_module>
ModPagespeed on
ModPagespeedRespectVary off
ModPagespeedEnableFilters combine_css,rewrite_css,inline_css,rewrite_images,move_css_above_scripts
ModPagespeedEnableFilters combine_javascript,rewrite_javascript,defer_javascript,inline_javascript
ModPagespeedMaxSegmentLength 1024
ModPagespeedDisableRewriteOnNoTransform off
ModPagespeedModifyCachingHeaders off
ModPagespeedListOutstandingUrlsOnError on
ModPagespeedMaxCombinedCssBytes 5000000
ModPagespeedMaxCombinedJsBytes 5000000
# output handler.
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
# The ModPagespeedFileCachePath
ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
ModPagespeedRewriteLevel PassThrough
# ModPagespeedDomain
ModPagespeedFetchHttps enable
ModPagespeedDomain http://jaktorch.com
ModPagespeedDomain https://jaktorch.com
ModPagespeedDomain http://deemasfashion.co.uk
ModPagespeedDomain https://deemasfashion.co.uk
ModPagespeedMapOriginDomain http://localhost https://deemasfashion.co.uk
ModPagespeedSslCertDirectory /var/cpanel/ssl/installed/certs
ModPagespeedSslCertFile /var/cpanel/ssl/installed/certs/jaktorch_com_9fca6_0207d_1488239999_ad703b214768c8358462af7ddf19bc91.crt
# Other defaults (cache sizes and thresholds):
ModPagespeedFileCacheSizeKb 102400
ModPagespeedFileCacheCleanIntervalMs 3600000
ModPagespeedLRUCacheKbPerProcess 1024
ModPagespeedLRUCacheByteLimit 16384
ModPagespeedCssInlineMaxBytes 2048
ModPagespeedImgInlineMaxBytes 2048
ModPagespeedJsInlineMaxBytes 2048
ModPagespeedCssOutlineMinBytes 3000
ModPagespeedJsOutlineMinBytes 3000
ModPagespeedStatistics on
ModPagespeedStatisticsLogging on
ModPagespeedLogDir /var/log/pagespeed
<Location /pagespeed_admin>
Order allow,deny
Allow from localhost
Allow from 127.0.0.1
SetHandler pagespeed_admin
</Location>
ModPagespeedLoadFromFile "https://deemasfashion.co.uk/" "/home/dmg165uk/public_html"
ModPagespeedLoadFromFile "http://deemasfashion.co.uk/" "/home/dmg165uk/public_html"
ModPagespeedLoadFromFile "https://jacktorch.com/" "/home/jaktorch/public_html"
ModPagespeedLoadFromFile "http://jacktorch.com/" "/home/jaktorch/public_html"
ModPagespeedLoadFromFileRuleMatch disallow .*
ModPagespeedLoadFromFileRuleMatch allow \.css$
ModPagespeedLoadFromFileRuleMatch allow \.jpe?g$
ModPagespeedLoadFromFileRuleMatch allow \.png$
ModPagespeedLoadFromFileRuleMatch allow \.gif$
ModPagespeedLoadFromFileRuleMatch allow \.js$
ModPagespeedLoadFromFileRuleMatch allow \.svg$
ModPagespeedMapOriginDomain http://localhost https://deemasfashion.co.uk
Images does not need to be gziped, if in some test you get the issue that images need compresion, this is another t+ype of compression done at the image itself and this type of stuff are done by modpagespeed.
To gzip resources that are untouched by ModPagespeed you need to set in the proper location in vhost config some like:
SetOutputFilter DEFLATE SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png|svg)$" no-gzip
This make that all resources are gziped unles these file types
About speed.... what about when you putModPagespeed off? I think thad speed issues are not related to pagespeed. Try to start the site w/o pagespeed enabled and test the speed then enable pagespeed and restart and test again
--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/cf8227ea-4f2a-4651-afba-75bccb7c675f%40googlegroups.com.