annotate xml/en/docs/http/ngx_http_gzip_module.xml @ 1878:127ae107e5a9

Removed clause about shared memory and Windows versions with ASLR. Starting with nginx 1.9.0 shared memory can be used on Windows versions with address space layout randomization.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 26 Dec 2016 19:38:06 +0300
parents 6d51bb4f19f7
children ca7568f67dee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
2
580
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 546
diff changeset
3 <!--
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 546
diff changeset
4 Copyright (C) Igor Sysoev
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 546
diff changeset
5 Copyright (C) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 546
diff changeset
6 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 546
diff changeset
7
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 <module name="Module ngx_http_gzip_module"
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 link="/en/docs/http/ngx_http_gzip_module.html"
589
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
12 lang="en"
1248
6d51bb4f19f7 Gzip: fixed minor flaws in the "gzip_proxied" directive.
Gunnlaugur Thor Briem <gunnlaugur@gmail.com>
parents: 966
diff changeset
13 rev="4">
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15 <section id="summary">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 The <literal>ngx_http_gzip_module</literal> module is a filter
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 that compresses responses using the “gzip” method.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
20 This often helps to reduce the size of transmitted data by half or even more.
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 </section>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 <section id="example" name="Example Configuration">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29 <example>
351
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 330
diff changeset
30 gzip on;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 330
diff changeset
31 gzip_min_length 1000;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 330
diff changeset
32 gzip_proxied expired no-cache no-store private auth;
a4fa80755eab Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents: 330
diff changeset
33 gzip_types text/plain application/xml;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 </example>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
36
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
37 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 The <var>$gzip_ratio</var> variable can be used to log the
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 achieved compression ratio.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42 </section>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45 <section id="directives" name="Directives">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47 <directive name="gzip">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 <syntax><literal>on</literal> | <literal>off</literal></syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 <default>off</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
51 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53 <context>if in location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
56 Enables or disables gzipping of responses.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
57 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
58
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
59 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
60
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
61
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
62 <directive name="gzip_buffers">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 <syntax><value>number</value> <value>size</value></syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64 <default>32 4k|16 8k</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
68
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
69 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
70 Sets the <value>number</value> and <value>size</value> of buffers
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
71 used to compress a response.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
72 By default, the buffer size is equal to one memory page.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
73 This is either 4K or 8K, depending on a platform.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
74 <note>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
75 Until version 0.7.28, four 4K or 8K buffers were used by default.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
76 </note>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
77 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
78
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
79 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
80
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
81
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
82 <directive name="gzip_comp_level">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
83
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
84 <syntax><value>level</value></syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
85 <default>1</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
86 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
87 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
88 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
89
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 Sets a gzip compression <value>level</value> of a response.
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
92 Acceptable values are in the range from 1 to 9.
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
98 <directive name="gzip_disable">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
99 <syntax><value>regex</value> ...</syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 <default/>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104 <appeared-in>0.6.23</appeared-in>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 Disables gzipping of responses for requests with
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 <header>User-Agent</header> header fields matching
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 any of the specified regular expressions.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 The special mask “<literal>msie6</literal>” (0.7.12) corresponds to
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
114 the regular expression “<literal>MSIE [4-6]\.</literal>”, but works faster.
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
115 Starting from version 0.8.11, “<literal>MSIE 6.0; ... SV1</literal>”
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 is excluded from this mask.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 <directive name="gzip_min_length">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
123 <syntax><value>length</value></syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
124 <default>20</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
125 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
126 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
127 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
128
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
129 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
130 Sets the minimum length of a response that will be gzipped.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
131 The length is determined only from the <header>Content-Length</header>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
132 response header field.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
134
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 <directive name="gzip_http_version">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139 <syntax><literal>1.0</literal> | <literal>1.1</literal></syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140 <default>1.1</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
142 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
145 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146 Sets the minimum HTTP version of a request required to compress a response.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
149 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
152 <directive name="gzip_proxied">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
153 <syntax>
364
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
154 <literal>off</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
155 <literal>expired</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
156 <literal>no-cache</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
157 <literal>no-store</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
158 <literal>private</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
159 <literal>no_last_modified</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
160 <literal>no_etag</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
161 <literal>auth</literal> |
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
162 <literal>any</literal>
bb51d3e17dd0 Style fixed.
Ruslan Ermilov <ru@nginx.com>
parents: 351
diff changeset
163 ...</syntax>
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164 <default>off</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
165 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
166 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
167 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
168
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
169 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
170 Enables or disables gzipping of responses for proxied
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171 requests depending on the request and response.
1248
6d51bb4f19f7 Gzip: fixed minor flaws in the "gzip_proxied" directive.
Gunnlaugur Thor Briem <gunnlaugur@gmail.com>
parents: 966
diff changeset
172 The fact that the request is proxied is determined by
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 the presence of the <header>Via</header> request header field.
1248
6d51bb4f19f7 Gzip: fixed minor flaws in the "gzip_proxied" directive.
Gunnlaugur Thor Briem <gunnlaugur@gmail.com>
parents: 966
diff changeset
174 The directive accepts multiple parameters:
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175 <list type="tag">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
177 <tag-name><literal>off</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
178 <tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
179 disables compression for all proxied requests,
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
180 ignoring other parameters;
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
181 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
182
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
183 <tag-name><literal>expired</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
185 enables compression if a response header includes the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
186 <header>Expires</header> field with a value that disables caching;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
187 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
188
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
189 <tag-name><literal>no-cache</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
190 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
191 enables compression if a response header includes the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
192 <header>Cache-Control</header> field with the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
193 “<literal>no-cache</literal>” parameter;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
194 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
195
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196 <tag-name><literal>no-store</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
197 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
198 enables compression if a response header includes the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
199 <header>Cache-Control</header> field with the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
200 “<literal>no-store</literal>” parameter;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
201 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
202
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
203 <tag-name><literal>private</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
204 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
205 enables compression if a response header includes the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
206 <header>Cache-Control</header> field with the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
207 “<literal>private</literal>” parameter;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
208 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
210 <tag-name><literal>no_last_modified</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
211 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
212 enables compression if a response header does not include the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
213 <header>Last-Modified</header> field;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
215
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
216 <tag-name><literal>no_etag</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
217 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
218 enables compression if a response header does not include the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
219 <header>ETag</header> field;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
220 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
221
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
222 <tag-name><literal>auth</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
223 <tag-desc>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
224 enables compression if a request header includes the
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
225 <header>Authorization</header> field;
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
226 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
227
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
228 <tag-name><literal>any</literal></tag-name>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
229 <tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230 enables compression for all proxied requests.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231 </tag-desc>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
233 </list>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
234 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
235
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
236 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
237
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
238
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
239 <directive name="gzip_types">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
240 <syntax><value>mime-type</value> ...</syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
241 <default>text/html</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
242 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
243 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
244 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
245
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
246 <para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
247 Enables gzipping of responses for the specified MIME types in addition
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
248 to “<literal>text/html</literal>”.
546
694db9597ee0 Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 364
diff changeset
249 The special value “<literal>*</literal>” matches any MIME type (0.8.29).
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
250 Responses with the “<literal>text/html</literal>” type are always compressed.
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
251 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
252
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
253 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
254
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
255
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256 <directive name="gzip_vary">
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
257 <syntax><literal>on</literal> | <literal>off</literal></syntax>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
258 <default>off</default>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259 <context>http</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260 <context>server</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
261 <context>location</context>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
262
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
263 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
264 Enables or disables inserting the <header>Vary: Accept-Encoding</header>
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
265 response header field if the directives
744
ac709e45740d Revision of ngx_http_gunzip_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents: 589
diff changeset
266 <link id="gzip"/>,
ac709e45740d Revision of ngx_http_gunzip_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents: 589
diff changeset
267 <link doc="ngx_http_gzip_static_module.xml" id="gzip_static"/>, or
ac709e45740d Revision of ngx_http_gunzip_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents: 589
diff changeset
268 <link doc="ngx_http_gunzip_module.xml" id="gunzip"/>
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
269 are active.
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
270 </para>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
271
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
272 </directive>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
273
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
274 </section>
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275
825
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
276
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
277 <section id="variables" name="Embedded Variables">
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
278
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
279 <para>
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
280 <list type="tag">
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
281
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
282 <tag-name id="var_gzip_ratio"><var>$gzip_ratio</var></tag-name>
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
283 <tag-desc>achieved compression ratio, computed as the ratio between the
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 825
diff changeset
284 original and compressed response sizes.</tag-desc>
825
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
285
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
286 </list>
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
287 </para>
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
288
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
289 </section>
ae15915990ad Documented the "gzip_ratio" variable.
Homutov Vladimir <vl@nginx.com>
parents: 744
diff changeset
290
330
f94bcab2a6ae Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
291 </module>