Open journeytosilius opened 8 years ago
This configuration looks suspicious:
pagespeed SslCertDirectory /etc/letsencrypt/live/chinaboundltd.com;
pagespeed SslCertFile fullchain.pem;
What are you trying to do with those two lines? Do you need them?
Hi Jeff, ok I have removed it and now seems that pagespeed is doing more work, like transforming images to webp and combining the CSS. But the JS is still not being combined and only a few files are being rewritten to the CDN. Note that I have changed from sharding domains to :
pagespeed EnableFilters rewrite_domains;
pagespeed MapRewriteDomain https://a.chinaboundltd.com https://chinaboundltd.com;
And it does the same as it did before. Only some URL's are being rewritten.
Also, strangely my first byte time has ramped up. Any thoughts please ? Thank you.
It seems your javascript files are injected via javascript. ngx_pagespeed will not be able to combine them because it is not able to parse them out of the script that injects them.
I do not see any domain rewriting occurring at all at the moment. Do you still have that configured? If so, are you sure that the webserver receives a correct X-Forwarded-Proto header?
Hi Otto, sorry I was making some tests on the configuration. If you visit the site now you will be able to see that only 46% of the assets are being rewritten to the CDN. Where should I check for the header sending ?
Hopefully you can set up forwarding of the header at your cdn. To verify nginx is receiving it, you need debug level logging so you can check the incoming request headers from the CDN: http://nginx.org/en/docs/debugging_log.html
Pagespeed is not rewriting most of the content to the CDN, specially some images and also not combining CSS or JS files.
On the source with debug on I get this :
<link rel=stylesheet href="https://a.chinaboundltd.com/wp-content/plugins/formcraft3/assets/css/form.min.css?ver=3.2.18"><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/plugins/formcraft3/assets/css/form.min.css?ver=3.2.18--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/plugins/formcraft3/assets/css/form.min.css?ver=3.2.18--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/plugins/formcraft3/assets/css/form.min.css?ver=3.2.18--><link rel=stylesheet href="https://a.chinaboundltd.com/wp-content/plugins/js_composer/assets/css/js_composer.min.css?ver=4.11.2.1"><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/plugins/js_composer/assets/css/js_composer.min.css?ver=4.11.2.1--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/plugins/js_composer/assets/css/js_composer.min.css?ver=4.11.2.1--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/plugins/js_composer/assets/css/js_composer.min.css?ver=4.11.2.1--><link rel=stylesheet href="https://a.chinaboundltd.com/wp-content/themes/modo/assets/css/bootstrap.css"><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/bootstrap.css--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/bootstrap.css--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/bootstrap.css--><link rel=stylesheet href="https://a.chinaboundltd.com/wp-content/themes/modo/assets/css/modo.css?ver=1.0"><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/modo.css?ver=1.0--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/modo.css?ver=1.0--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/modo.css?ver=1.0--><link rel=stylesheet href="https://a.chinaboundltd.com/wp-content/themes/modo/assets/css/skins/gray.css"><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/skins/gray.css--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/skins/gray.css--><!--4xx status code, preventing rewriting of https://chinaboundltd.com/wp-content/themes/modo/assets/css/skins/gray.css--><style>
Nginx logs :
2016/09/19 06:43:39 [error] 16537#0: [ngx_pagespeed 1.11.33.2-0] https://chinaboundltd.com/wp-content/uploads/2016/06/cbweb24.jpg:0:serf_context_run error status=20014 (Internal error)
Pagespeed configuration :
NOTE : Sometimes it does rewrite the JS partially ( not the CSS though ) and combines it. It also sometimes rewrites more URL's to the CDN, as shown on this result :