x配置文件/etc/nginx/ngnix.conf并没有发现任何问题。仍然无法看到css和javascript Gzip压缩。我的NGINX.conf条目如下 -
gzip on;
gzip_disable "msie6";
gzip_comp_level 6;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_types text/plain text/css text/js text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss;
答案 0 :(得分:6)
我认为你缺少gzip_vary on;
,这就是为列出的gzip_types
启用gzip压缩的原因
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;