# HG changeset patch # User Ruslan Ermilov # Date 1326963012 0 # Node ID f94bcab2a6ae25fac70606c123df7469d6886913 # Parent 7571ab5b376e1f0508cf7ea43563fb913c9b7e61 Translated ngx_http_gzip_module and ngx_http_gzip_static_module. diff -r 7571ab5b376e -r f94bcab2a6ae xml/en/GNUmakefile --- a/xml/en/GNUmakefile Wed Jan 18 16:10:54 2012 +0000 +++ b/xml/en/GNUmakefile Thu Jan 19 08:50:12 2012 +0000 @@ -52,6 +52,8 @@ http/ngx_http_empty_gif_module \ http/ngx_http_fastcgi_module \ http/ngx_http_flv_module \ + http/ngx_http_gzip_module \ + http/ngx_http_gzip_static_module \ http/ngx_http_image_filter_module \ http/ngx_http_index_module \ http/ngx_http_limit_conn_module \ diff -r 7571ab5b376e -r f94bcab2a6ae xml/en/docs/http/ngx_http_gzip_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_gzip_module.xml Thu Jan 19 08:50:12 2012 +0000 @@ -0,0 +1,266 @@ + + + + + + +
+ + +The ngx_http_gzip_module module is a filter +that compresses responses using the “gzip” method. +This often allows to reduce the size of transmitted data by half or even more. + + +
+ + +
+ + + + gzip on; + gzip_min_length 1000; + gzip_proxied expired no-cache no-store private auth; + gzip_types text/plain application/xml; + + + + +The $gzip_ratio variable can be used to log the +achieved compression ratio. + + +
+ + +
+ + +on | off +off +http +server +location +if in location + + +Enables or disables gzipping of responses. + + + + + + +number size +32 4k|16 8k +http +server +location + + +Sets the number and size of buffers +used to compress a response. +By default, the buffer size is equal to one memory page. +This is either 4K or 8K, depending on a platform. + +Until version 0.7.28, four 4K or 8K buffers were used by default. + + + + + + + + +level +1 +http +server +location + + +Sets a gzip compression level of a response. +Acceptable values are in the 1..9 range. + + + + + + +regex ... + +http +server +location +0.6.23 + + +Disables gzipping of responses for requests with +
User-Agent
header fields matching +any of the specified regular expressions. +
+ + +The special mask “msie6” (0.7.12) corresponds to +the regular expression “MSIE [4-6]\.” but works faster. +Starting from version 0.8.11, “MSIE 6.0; ... SV1” +is excluded from this mask. + + +
+ + + +length +20 +http +server +location + + +Sets the minimum length of a response that will be gzipped. +The length is determined only from the
Content-Length
+response header field. +
+ +
+ + + +1.0 | 1.1 +1.1 +http +server +location + + +Sets the minimum HTTP version of a request required to compress a response. + + + + + + + + off | + expired | + no-cache | + no-store | + private | + no_last_modified | + no_etag | + auth | + any + ... +off +http +server +location + + +Enables or disables gzipping of responses for proxied +requests depending on the request and response. +The fact that the response is proxied is determined based on +the presence of the
Via
request header field. +A directive accepts multiple parameters: + + +off + +disables compression for all proxied requests, +ignoring other parameters; + + +expired + +enables compression if a response header includes the field +
Expires
with a value that disables caching; +
+ +no-cache + +enables compression if a response header includes the field +
Cache-Control
with the parameter “no-cache”; +
+ +no-store + +enables compression if a response header includes the field +
Cache-Control
with the parameter +“no-store”; +
+ +private + +enables compression if a response header includes the field +
Cache-Control
with the parameter “private”; +
+ +no_last_modified + +enables compression if a response header does not include the field +
Last-Modified
; +
+ +no_etag + +enables compression if a response header does not include the field +
ETag
; +
+ +auth + +enables compression if a request header includes the field +
Authorization
; +
+ +any + +enables compression for all proxied requests. + + +
+
+ +
+ + + +mime-type ... +text/html +http +server +location + + +Enables gzipping of responses for the specified MIME types in addition +to “text/html”. +Responses with the type “text/html” are always compressed. + + + + + + +on | off +off +http +server +location + + +Enables or disables emitting the
Vary: Accept-Encoding
+response header field if the directives + or + +are active. +
+ +
+ +
+ +
diff -r 7571ab5b376e -r f94bcab2a6ae xml/en/docs/http/ngx_http_gzip_static_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_gzip_static_module.xml Thu Jan 19 08:50:12 2012 +0000 @@ -0,0 +1,67 @@ + + + + + + +
+ + +The ngx_http_gzip_static_module module allows +to send precompressed files with the “.gz” +filename extension instead of regular files. + + + +This module is not built by default, it should be enabled with the +--with-http_gzip_static_module +configuration parameter. + + +
+ + +
+ + + + gzip_static on; + gzip_proxied expired no-cache no-store private auth; + + + +
+ + +
+ + +on | off +off +http +server +location + + +Enables or disables checking the existence of precompressed files. +The following directives are also taken into account: +, +, +, +and . + + + +The files can be compressed using the gzip command, +or any other compatible. +It is recommended that the modification date and time of original and +compressed files be the same. + + + + +
+ +
diff -r 7571ab5b376e -r f94bcab2a6ae xml/en/docs/index.xml --- a/xml/en/docs/index.xml Wed Jan 18 16:10:54 2012 +0000 +++ b/xml/en/docs/index.xml Thu Jan 19 08:50:12 2012 +0000 @@ -110,6 +110,16 @@ + +ngx_http_gzip_module + + + + +ngx_http_gzip_static_module + + + ngx_http_image_filter_module diff -r 7571ab5b376e -r f94bcab2a6ae xml/en/index.xml --- a/xml/en/index.xml Wed Jan 18 16:10:54 2012 +0000 +++ b/xml/en/index.xml Thu Jan 19 08:50:12 2012 +0000 @@ -63,7 +63,9 @@ Modular architecture. -Filters include gzipping, byte ranges, chunked responses, XSLT, SSI, +Filters include +gzipping, +byte ranges, chunked responses, XSLT, SSI, and image transformation filter. Multiple SSI inclusions within a single page can be processed in