Skip to content

Instantly share code, notes, and snippets.

@mhaylock
Created May 27, 2011 11:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhaylock/995049 to your computer and use it in GitHub Desktop.
Save mhaylock/995049 to your computer and use it in GitHub Desktop.
nginx config to add Cache-Control header to rails static cache files
location / {
try_files /system/maintenance.html $uri $uri/index.html $uri.html @passenger;
expires 60s;
add_header Cache-Control public;
add_header Vary Accept-Encoding;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment