nginx gzip 开启无效果,和系统有关系吗?

tianshannihao 发布于 2015/07/15 17:34
阅读 464
收藏 0

软件环境:nginx1.8+centos6

nginx配置
gzip on;
gzip_min_length  1k;
gzip_buffers     4 16k;
gzip_comp_level 3;
gzip_types text/plain application/x-javascript text/css text/javascript application/x-httpd-php image/jpeg image/gif image/png;
gzip_vary on;

问题:测试机上没问题,gzip生效,但另一台相同配置的机器,不生效
测试机Response Headers

Server nginx
Date Wed, 15 Jul 2015 09:30:16 GMT
Content-Type image/png
Transfer-Encoding chunked
Connection keep-alive
X-Powered-By ***
Content-Encoding  gzip


另一台服务器Response Headers

Via 1.1 ****
Connection Keep-Alive
Proxy-Connection Keep-Alive
Transfer-Encoding chunked
Date Wed, 15 Jul 2015 09:34:36 GMT
Content-Type image/png
Server nginx
X-Powered-By *****

请求头信息

Host                     www.test.cn
User-Agent            Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0
Accept                  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language    zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding     gzip, deflate
Connection            keep-alive
Pragma                 no-cache
Cache-Control        no-cache



加载中
返回顶部
顶部