From daba481b3b318f4a2acc758f0b6bbfcbaa783cc9 Mon Sep 17 00:00:00 2001 From: thehrz Date: Sun, 6 Aug 2023 14:47:21 +0800 Subject: [PATCH] feat: add gzip --- nginx/conf.d/www.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nginx/conf.d/www.conf b/nginx/conf.d/www.conf index 295729e..2bee6aa 100644 --- a/nginx/conf.d/www.conf +++ b/nginx/conf.d/www.conf @@ -3,6 +3,15 @@ server { listen [::]:80; server_name www.19yuke2.cn; + gzip on; + gzip_min_length 1k; + gzip_buffers 4 16k; + gzip_http_version 1.1; + gzip_comp_level 9; + gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/javascript application/json; + gzip_disable "MSIE [1-6]\."; + gzip_vary on; + location / { root /usr/local/nginx/html/; try_files $uri $uri/ /index.html;