Skip to content

Instantly share code, notes, and snippets.

@jasonroelofs
Created January 8, 2013 21:25
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 jasonroelofs/4488109 to your computer and use it in GitHub Desktop.
Save jasonroelofs/4488109 to your computer and use it in GitHub Desktop.
try_files
@cache
/maintenance.html
@passenger;
location @cache {
# Make sure we don't try to hit the cache files on POST or nginx
# will explode with a 405 Method Not Allowed
if ($request_method != GET) {
return 404;
}
try_files /cache/$uri /cache/$uri.html =404;
}
location @passenger {
passenger_enabled on;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment