MapProxyDomain and MapRewriteDomain relationship

已查看 102 次
跳至第一个未读帖子

Yoshi Spendiff

未读,
2015年2月19日 17:00:482015/2/19
收件人 mod-pagesp...@googlegroups.com
Hi,

I have a question about a particular functionality with pagespeed and I'm not in a position to be able to test it myself at the moment so I was hoping someone here would know. I can't find this situation mentioned the documentation anywhere.

Essentially I'm wondering if the (using the apache module) ModPagespeedMapProxyDomain and ModPagespeedMapRewriteDomain settings work together or if they're mutually exclusive.

The situation where I'm hoping to apply this is in relation to images, with shared images and local images in the same location. For example say we have the following image url paths:

In my situation the paths 1 and 2 are local images (static, checked in assets which are deployed) and paths a and b are shared images (all app servers need access to them, variable assets changed by the system). Currently the assets in a and b are synced between servers but this is a pain and we want to move this to shared storage in Amazon S3.

We also use Cloudfront as a CDN, which we currently map to with the ModPagespeedMapRewriteDomain declaration. Amazon S3 supports file access by URL so we thought we could use the ModPagespeedMapProxyDomain declaration for this. The question is as we only want to proxy specific sub paths of the overall URL (i.e. /images/a or /images/b) how would this play with the existing rewrite domain settings?

So if we have a config something like this:

ModPagespeedMapRewriteDomain http://cdn.example.com http://www.example.com

Is this going to proxy those 2 paths and then rewrite the rest using local resources or is this not how it works?

The other option is move the shared images to a different domain, but that's what I'm hoping to avoid with this.

Cheers

Jeff Kaufman

未读,
2015年2月23日 09:19:312015/2/23
收件人 mod-pagespeed-discuss
That looks like it would work.

Since you already have a cdn set up you should be able to test this
before moving to s3. For example, you could modify one reference on
one of your sites to images/a/foo on a different of your site and add
a MapProxyDomain command to pull it into that site's url space.
> --
> You received this message because you are subscribed to the Google Groups
> "mod-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mod-pagespeed-di...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mod-pagespeed-discuss/28d74d42-00e3-452e-b40e-240d3895f077%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
回复全部
回复作者
转发
0 个新帖子