M
M
Moor2016-08-08 14:00:50
htaccess
Moor, 2016-08-08 14:00:50

How to properly configure the PageSpeed ​​cache for linking with the CDN?

Friends, help me, I'm completely confused.
So there is site.com, site.net, site.org, and they are all different sites. For them, a CDN is raised through MaxCDN, the static.site.info domain is made. All this physically on one server. All work only through HTTPS.
Static files are launched via rewrite:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^site\.com$ [NC]
RewriteCond %{REQUEST_URI} \.(jpe?g|png|gif|svg|css|js|eot|ttf|woff2|webp?)$ [NC]
RewriteRule ^ http://static.site.info/cache/com%{REQUEST_URI} [R=301,L]

All statics are physically copied to the right place (so as not to holivar - sites have files with the same name, but with different content).
Mod_pagespeed is running on the server, CDN has been added to the config:
ModPagespeedEnableFilters rewrite_domains
ModPagespeedMapRewriteDomain static.site.info/cache/com site.com

How do I get everything mod_pagespeed glues and generates to go to the CDN?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question