Yeah CDN served static files will bypass ngx_pagespeed by default. You can use MapOriginDomain and MapRewriteDomain to work with CDNs apparently but I haven't played with it much myself especially for https SSL origins and CDN as CDN with SSL custom certificates usually cost alot i.e. US$600/yr with Cloudflare and US$699/yr with cdn77.com

Mapping origin domains
In order to improve the performance of web pages, PageSpeed must examine and modify the content of resources referenced on those pages. To do that, it must fetch those resources using HTTP, using the URL reference specified on the HTML page.

In some cases, the URL specified in the HTML file is not the best URL to use to fetch the resource. Scenarios where this is a concern include:

If the server is behind a load balancer, and it's more efficient to reference the server directly by its IP address, or as 'localhost'.

The server has a special DNS configuration

The server is behind a firewall preventing outbound connections

The server is running in a CDN or proxy, and must go back to the origin server for the resources

Mapping rewrite domains
When PageSpeed rewrites a resource, it updates the HTML to refer to the resource by its new name. Generally PageSpeed leaves the resource at the same origin and path that was originally found in the HTML. However, it is possible to map the domain of rewritten resources. Examples of why this might be desirable include:

Serving static content from cookieless domains, to reduce the size of HTTP requests from the browser. See Minimizing Payload

The domain_to_write_into_html can include a path after the domain name, e.g.

Apache:

Code:

ModPagespeedMapRewriteDomain cdn.com/example *.example.com

Nginx:

Code:

pagespeed MapRewriteDomain cdn.com/example *.example.com;

When a path is specified, the source domain is rewritten to the destination domain and the source path is rewritten to the concatenation of the path from domain_to_write_into_html and the source path. For example, given the above mapping,Example Domain will be rewritten to http://cdn.com/example/index.html.

Yeah CDN served static files will bypass ngx_pagespeed by default. You can use MapOriginDomain and MapRewriteDomain to work with CDNs apparently but I haven't played with it much myself especially for https SSL origins and CDN as CDN with SSL custom certificates usually cost alot i.e. US$600/yr with Cloudflare and US$699/yr with cdn77.com

CDNify also temporarily disable SPDY due to maintenance, but it will be enable soon as they said.

Did your ngx_pagespeed works fine with resources server by your CDN?

I ask Keycdn support for a test IP of their Singapore, Hong Kong, japan and I got very slow ping with them.

All the 3 small window is KEYCDN IP, and the big one is the current CDN i'm using which is CDNify.
Usually Hong Kong and Singapore has 60-100 ping time to me, but with the IP keyCDN provided it's very slow.

Yeah my KeyCDN ngx_pagespeed worked fine with what they called zonealiases so I setup a CNAME for custom.mydomain.com to their zone name zonename.keycdn.com and referenced custom.mydomain.com in my pagespeed.conf with the 2 settings I listed above and restarted nginx for pagespeed.conf to come into effect.

Only thing I not too fond of with KeyCDN, is no SPDY SSL yet and the http headers list HIT from zonename.keycdn.com as opposed to HIT from custom.mydomain.com

Yeah my KeyCDN ngx_pagespeed worked fine with what they called zonealiases so I setup a CNAME for custom.mydomain.com to their zone name zonename.keycdn.com and referenced custom.mydomain.com in my pagespeed.conf with the 2 settings I listed above and restarted nginx for pagespeed.conf to come into effect.

Only thing I not too fond of with KeyCDN, is no SPDY SSL yet and the http headers list HIT from zonename.keycdn.com as opposed to HIT from custom.mydomain.com