**ngx_http_gzip_module Module Configuration * *
gzip on|off; Enable or disable gzip compression response messages;
Gzip_comp_level level; Compression ratio, 1-9, default is 1;
Gzip_disable regex ...; The regex is a regular expression that matches the type of the client responder, and which browser is prohibited from using the compression function;
Gzip_min_length length; the minimum size of the response message that triggers the compression function;
Gzip_http_version 1.0/1.1; Sets the minimum version of the Protocol when the compression function is enabled;
Gzip_proxied off|expired|no-cache|no-store|private|no_last_modified|no_etag|auth|any.;
Defines the ability to enable compression for a resource with the requested property of a client request, such as expired to enable compression for objects that cannot be cached due to the use of the expire header;
gzip on; Gzip_http_version 1.0; Gzip_comp_level 6; Gzip_disable msie6; Gzip_min_length 2; Gzip_types text/plain text/css text/xml application/x-javascript application/xml Application/json application/ Java-script;
Note: Enabling compression consumes the CPU but can save bandwidth.
Nginx (Seven) gzip compression function