4xx status code, preventing rewriting of resources

25 views
Skip to first unread message

Krunal Jariwala

unread,
Mar 19, 2020, 2:32:09 PM3/19/20
to ngx-pagespeed-discuss
While debug I get following


<!--4xx status code, preventing rewriting of ... of CSS & JS resources.


I have

pagespeed FetchHttps enable,allow_self_signed;
pagespeed SslCertDirectory /etc/ssl/certs;

and

pagespeed LoadFromFile "https://domain.com/Themes" "/var/cache/nginx/pagespeed_cache/Themes";
pagespeed LoadFromFile "https://domain.com/Plugins" "/var/cache/nginx/pagespeed_cache/Plugins";
pagespeed LoadFromFile "https://domain.com/lib" "/var/cache/nginx/pagespeed_cache/lib";

I don't see any error here http://prntscr.com/rj6z8s and there are no errors into docker logs related to SSL. I am using LetsEncrypt SSL cert.

What could be wrong, and how to fix?

Longinos

unread,
Mar 20, 2020, 9:01:12 AM3/20/20
to ngx-pagespeed-discuss
Hi

Try to auth the domain

pagespeed domain http*://*.domain.com;
pagespeed domain http*://*.googleapis.com;

Phil W

unread,
Mar 21, 2020, 3:56:05 AM3/21/20
to ngx-pagespeed-discuss
I have exactly the same problem. I am on https with letsencrypt but pagespeed tries to optimize http instead of https, e.g. Loadfromfile with https:// as scheme nothing happens with http:// resources were optimized. There is some reason pagespeed ignors https.

Krunal Jariwala

unread,
Mar 21, 2020, 7:15:24 AM3/21/20
to ngx-pagespeed-discuss
Thanks Phil for your response. Did you finally get it resolved?

Longinos

unread,
Mar 21, 2020, 5:09:04 PM3/21/20
to ngx-pagespeed-discuss
Hi Krunal
Whe I run your site with /?PageSpeed=unplugged (This disables pagespeed)
I see that
bridal-collectionlargue.jpg is served with a strange cache-control header :max-age=5184000, public, max-age=604800, s-maxage=10max-age=5184000, public, max-age=604800, s-maxage=10max-age=5184000, public, max-age=604800, s-maxage=10 mamax-age=5184000, public, max-age=604800, s-maxage=10x-age=5184000, public, max-age=604800, s-maxa
max-age=5184000, public, max-age=604800, s-maxage=10

Whe I run the site with /?PageSpeedFilters=+debug,-lazyload_images (This enables debug mode and disables lazyload)

I see a bunch of <!--4xx status code, preventing and <!--Uncacheable content, preventing rewriting of

The 4xx message mostly says that pagespeed is unable to fecht the resource
and the Uncacheble message say that the cache-control header is other that mas-age/public

If you fecht the backend server, what are the header for the resources?
If yu run curl -I https://yoursite.com/rewrited_by_pagespeed.jpg , what happens?



Reply all
Reply to author
Forward
0 new messages