From f58f1a238200c48f8836264e3fabf935da9c3071 Mon Sep 17 00:00:00 2001 From: Josh Mudge Date: Sat, 12 Jan 2019 22:28:49 -0700 Subject: [PATCH] Update not-so-great tweaks. --- performance-tweaks-nginx | 66 ++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/performance-tweaks-nginx b/performance-tweaks-nginx index 816b772..abc123b 100644 --- a/performance-tweaks-nginx +++ b/performance-tweaks-nginx @@ -1,43 +1,35 @@ -map $sent_http_content_type $expires { - default off; - text/html epoch; - text/css max; - application/javascript max; - ~image/ max; - application/font-woff max; - application/font-woff2 max; - application/x-font-truetype max; - application/x-font-opentype max; -} - + # Expires map + map $sent_http_content_type $expires { + default off; + text/html epoch; + text/css max; + application/javascript max; + ~image/ max; + application/font-woff max; + application/font-woff2 max; + application/x-font-truetype max; + application/x-font-opentype max; + } server { -# listen 8080 default_server; -# listen [::]:8080 default_server; -# return 301 https://$host$request_uri; - - # SSL configuration - # - listen 443 ssl default_server; - listen [::]:443 ssl default_server; - #ssl_certificate /etc/letsencrypt/live/cityofardon.com/fullchain.pem; # managed by Certbot - #ssl_certificate_key /etc/letsencrypt/live/cityofardon.com/privkey.pem; # managed by Certbot expires $expires; - - # Enable Gzip - gzip on; - gzip_buffers 4 8k; - gzip_proxied any; - gzip_types - text/css - font/truetype - font/opentype - - gzip_static on; - - gzip_proxied expired no-cache no-store private auth; - gzip_disable "MSIE [1-6]\."; - gzip_vary on; + # Enable Gzip for select elements. (safe) + gzip on; + gzip_buffers 4 8k; + gzip_proxied any; + gzip_types + text/css + font/truetype + font/opentype + text/plain; + # text/javascript +# application/javascript; + + gzip_static on; + + gzip_proxied expired no-cache no-store private auth; + gzip_disable "MSIE [1-6]\."; + gzip_vary on;