Skip to content

Instantly share code, notes, and snippets.

@agibralter
Created December 2, 2011 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agibralter/1425369 to your computer and use it in GitHub Desktop.
Save agibralter/1425369 to your computer and use it in GitHub Desktop.
server {
listen 8000;
server_name <%= @server_name %>;
root <%= @root %>;
# Allow all assets to be cached by CloudFront and browsers.
add_header Cache-Control public;
# Default expires of 1 hour.
expires 1h;
# Only set far-future expires for assets with hashes. Note: since max_expire
# contains curly brackets in the regexp, we must use quotes.
location ~* "<%= @max_expire %>" {
expires max;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment