Jump to content

Using nginx to cache and optimize (PageSpeed) from Amazon S3

Recommended Posts

I need to type this out to fully understand myself what I'm trying to accomplish.

I have a webserver running nginx on www.example.com. Static assets are hosted on Amazon S3 (storage configuration set up in ACP) cnamed to cdn.example.com. I previously used Cloudflare on both S3 and the webserver, but I'm trying out some other solutions to see if there is any difference.

What I want to do is: I want nginx to fetch static assets from S3, then process them with PageSpeed and cache them locally.

I have a working nginx setup where assets are fetched from S3 and cached locally, but I have not yet tried with PageSpeed in the mix. Would it be as simple as adding the PageSpeed config to the proxy server block that does the fetching, or in the main server block (for www, not cdn)? Do I need to configure domains in PageSpeed (MapOriginDomain or something similar)? Will PageSpeed work without rewriting the HTML?

The following resources have been a great help so far:

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...