From 7e3f6eba3d08e7aa4af4efb8171ea008760ac672 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 6 Sep 2020 13:31:03 +0900 Subject: [PATCH] Add `gzip` settings. --- cookbooks/nginx/files/etc/nginx/nginx.conf | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/cookbooks/nginx/files/etc/nginx/nginx.conf b/cookbooks/nginx/files/etc/nginx/nginx.conf index 49a5838..c9c5eae 100644 --- a/cookbooks/nginx/files/etc/nginx/nginx.conf +++ b/cookbooks/nginx/files/etc/nginx/nginx.conf @@ -64,6 +64,34 @@ http { # if client stop responding, free up memory -- default 60 send_timeout 2s; + ## + # gzip Settings + ## + gzip on; + gzip_static on; + gzip_min_length 10240; + gzip_comp_level 1; + gzip_vary on; + gzip_disable msie6; + gzip_proxied expired no-cache no-store private auth; + gzip_types + text/html + text/css + text/javascript + text/xml + text/plain + text/x-component + application/javascript + application/x-javascript + application/json + application/xml + application/rss+xml + application/atom+xml + font/truetype + font/opentype + application/vnd.ms-fontobject + image/svg+xml; + ## # Logging Settings ##