CDN questions...

Ryan Malayter malayter at gmail.com
Sat Jan 8 22:36:43 MSK 2011


On Sat, Jan 8, 2011 at 8:52 AM, Ilan Berkner <iberkner at gmail.com> wrote:
>
> Thanks for the details, once I realized the difference, going directly to the CDN is the whole point.
> Rackspace has an interesting product which combines storage + CDN so for us that kind solution may work well, but we're still exploring.
> Thanks

Don't forget the sub_filter module:
http://wiki.nginx.org/HttpSubModule

or the third-party subs_filter which can handle regex:
http://wiki.nginx.org/HttpSubsModule

We've used the former to test a CDN without modifying any application
code or application configuration and without doing HTTP redirects.

In your case something like this might help (assuming you keep the
same path structure on the CDN as your site, or you are using origin
fetch mode):
    sub_filter      'www.ourdomain.com/sounds''
'mybucket.cdndomain.com/sounds/';
    sub_filter_once off;

If you need to do regex or multiple rules in a location, you'll need
the thrid-party subs_filter instead of the built-in sub_filter.

--
RPM



More information about the nginx mailing list