Answer the question
In order to leave comments, you need to log in
gzip not working in nginx, what's the problem?
There is one server with these gzip settings:
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_min_length 1024;
gzip_http_version 1.0;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
Connection:keep-alive
Content-Type:text/html; charset=UTF-8
Date:Fri, 21 Nov 2014 17:31:18 GMT
Server:nginx/1.6.2
Transfer-Encoding:chunked
X-Powered-By:PHP/5.5.19-1~dotdeb.1
Answer the question
In order to leave comments, you need to log in
Take a look at the definition of nginx MIME types - mime.types file. For js files, recent versions use application/javascript instead of text/javascript. If so, change gzip_types to match this definition.
1. Content-Type:text/html is not listed in gzip_types;
2. You may be getting less than 1024 which is specified in gzip_min_length.
Reconsider or everything is correctly indicated:
yapro.ru/web-master/apache/nastroyka-gzip-v-nginx.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question