Skip to content

Instantly share code, notes, and snippets.

@jonluca
Last active March 30, 2018 21:39
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 jonluca/7b0e3a0c21f6ddc5a650ff68da56e481 to your computer and use it in GitHub Desktop.
Save jonluca/7b0e3a0c21f6ddc5a650ff68da56e481 to your computer and use it in GitHub Desktop.
server {
listen 443 ssl http2;
server_name jonlu.ca www.jonlu.ca;
root /var/www/html;
index index.html index.htm;
location ~ /.git/ {
deny all;
}
location ~* /(images|js|css|fonts|assets|dist) {
gzip_static on; # Tells nginx to look for compressed versions of all requested files first
expires 15d; # 15 day expiration for all static assets
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment