Skip to content

Instantly share code, notes, and snippets.

@brichards
Last active May 4, 2021 09:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save brichards/68c9686066e7dc9df5b9 to your computer and use it in GitHub Desktop.
Save brichards/68c9686066e7dc9df5b9 to your computer and use it in GitHub Desktop.
# Directives to send expires headers and turn off 404 error logging.
location ~* \.(js|css|png|jpe?g|gif|ico)$ {
expires 24h;
log_not_found off;
try_files $uri $uri/ @production;
}
location @production {
resolver 8.8.8.8;
proxy_pass http://example.com/$uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment