0

I have a pretty stock setup of mod_pagespeed on a stock CentOS6 with stock Apache 2.2. All I do is set "ModPagespeed on" in the VirtualHost. I can see the "-Mod-Pagespeed 1.13.35.2-0" http header. When using the "?PageSpeedFilters=debug" url query string I can see a lot of comments like these in the source(*):

<!--Uncacheable content, preventing rewriting of https://www.example.com/app/css/vendor/fontawesome/css/fontawesome-all.css--> 

I can fetch these files fine and there are no cache headers.

I can see it working as expected on HTTP but not HTTPS.

I have tried these directives to enable fetching over HTTP instead of HTTPS but still getting 'uncacheable content':

ModPagespeedDomain https://example.com ModPagespeedDomain https://www.example.com ModPagespeedMapOriginDomain "http://fetch.example.com" "https://example.com" ModPagespeedMapOriginDomain "http://fetch.example.com" "https://www.example.com" 

^ I have confirmed with wget I can get the files that are in the html source under fetch.example.com on the server.

Thank you,

*At the end of the file I see this debug which looks okay to me:

mod_pagespeed on Filters: ah Add Head cc Combine Css jc Combine Javascript gp Convert Gif to Png jp Convert Jpeg to Progressive jw Convert Jpeg To Webp mc Convert Meta Tags pj Convert Png to Jpeg ws When converting images to WebP, prefer lossless conversions db Debug ec Cache Extend Css ei Cache Extend Images es Cache Extend Scripts fc Fallback Rewrite Css if Flatten CSS Imports hw Flushes html ci Inline Css ii Inline Images il Inline @import to Link ji Inline Javascript js Jpeg Subsampling rj Recompress Jpeg rp Recompress Png rw Recompress Webp ri Resize Images cf Rewrite Css jm Rewrite External Javascript jj Rewrite Inline Javascript cu Rewrite Style Attributes With Url cp Strip Image Color Profiles md Strip Image Meta Data Options: EnableRewriting (e) 1 FileCacheInodeLimit (afcl) 500000 RunExperiment (fur) False StatisticsLogging (asle) True #NumFlushes 0 #EndDocument after 1955us #Total Parse duration 1799us #Total Render duration 23022us #Total Idle duration 156us No critical images detected. The following filters were disabled for this request: SupportNoscript 

1 Answer 1

0

Turned out to be a lack of "ModPagespeedFetchHttps enable" in my live environment although I thought I read that was now the default but okay.

Additionally, I was confused in my dev environment due to self-signed ssl certificates (even though I told it to map to http) but the self-signed thing was fixed by using "ModPagespeedFetchHttps enable,allow_self_signed,allow_unknown_certificate_authority".

Now both dev and live environments are compressing/optimizing/inlining/etc as expected from mod_pagespeed.

Docs on the additional ModPagespeedFetchHttps values here:

https://www.modpagespeed.com/doc/https_support#https_fetch

The relevant bits:

The available options are enable disable allow_self_signed allow_unknown_certificate_authority allow_certificate_not_yet_valid 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.