Today let's talk about Gzip compression and its setting in nginx.
In nginx for compression response module responds ngx_http_gzip_module, included in the standard build.
The official description of the module:
ngx_http_gzip_module Module - a filter response by compressing gzip, thereby reducing the size of data transmitted at two or more times.
Turn on GZip Π² Nginx, in the file /usr/local/etc/nginx/nginx.conf (the path may vary depending on your installation)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
http { ... # Turning module gzip on; # The minimum length of the response, in which the module will reap, in bytes gzip_min_length 1000; # Enable compression for all proxied requests gzip_proxied any; # MIME-types that need to press (text/html should not be specified, it is compressed always) gzip_types text/plain text/xml application/xml application/x-javascript text/javascript text/css text/json; # Prevents gzip compression method response for IE6 gzip_disable "msie6"; # Level gzip-compressed gzip_comp_level 6; ... } |
Do not forget to restart the Nginx, for the entry into force of the changes of the configuration file.
No Comment
You can post first response comment.