Performance tweaks, if they work.

This commit is contained in:
Josh Mudge 2019-01-12 22:28:07 -07:00
parent 2c0f304910
commit 5aca247a5a
1 changed files with 43 additions and 0 deletions

43
performance-tweaks-nginx Normal file
View File

@ -0,0 +1,43 @@
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;