3
I'm trying to setup pagespeed to proxy s3 files via nginx. I want to "save" the files on amazon s3;
The story I want is:
User A
1. nginx serves page to user; and rewrites all https://s3.amazonaws.com/mybucket to https://local.example.com/mybucket
2. browser requests https://local.example.com/mybucket/mypic.jpg
3. nginx takes request; requests file from https://s3.amazonaws.com/mybucket/mypic.jpg
4. nginx caches the response
5. nginx serves the response
User B (after user A)
1-2 are the same
3. nginx serves the cache response
I'm getting really confused by what is need to do so and I haven't found any examples of how to do this. This is what I have been trying; and I'm seeing that I may have to use a downstream cache.
pagespeed MapProxyDomain "https://local.example.com/mybucket/" "https://s3.amazonaws.com/mybucket/";
pagespeed MapRewriteDomain "https://s3.amazonaws.com/mybucket/" "https://local.lawgives.com/mybucket/";
Thank you in advance for the help!
-daniel