Nginx 开启 gzip压缩

Nginx  开启 gzip压缩
编辑 Nginx 配置文件
[root@zkankan ~]# vi /etc/nginx/nginx.conf
在server节点里添加以下内容
gzip on;
gzip_disable “msie6”;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types application/atom+xml application/geo+json application/javascript application/x-javascript application/json application/ld+json application/manifest+json application/rdf+xml application/rss+xml application/xhtml+xml application/xml font/eot font/otf font/ttf image/svg+xml text/css text/javascript text/plain text/xml;
重启 Nginx
[root@zkankan ~]# systemctl restart nginx

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注