Commit bc34da4e by 傅伟强-富德

Update nginx

1 parent 65d71ce3
Showing with 17 additions and 1 deletions
#user nobody;
worker_processes 1;
......@@ -44,6 +43,23 @@ http {
# }
#}
#开启gzip
gzip on;
#低于1kb的资源不压缩
gzip_min_length 1k;
#压缩级别【1-9】,越大压缩率越高,同时消耗cpu资源也越多,建议设置在4左右
gzip_comp_level 4;
#需要压缩哪些响应类型的资源,多个空格隔开
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css application/json image/jpeg image/gif image/png;
#配置禁用gzip条件,支持正则。此处表示ie6及以下不启用gzip(因为ie低版本不支持)
gzip_disable "MSIE [1-6]\.";
#是否添加“Vary: Accept-Encoding”响应头
gzip_vary on;
#上传文件大小设置
client_max_body_size 1024M;
upstream gateway
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!