Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_gzip_static_module.xml @ 1971:5fb870087b76
Fixed typo and removed trailing spaces.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Fri, 21 Apr 2017 12:48:01 +0300 |
parents | 95c3c3bbf1ce |
children |
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:
351
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
351
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_static_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_static_module.html" |
589 | 12 lang="en" |
677
934fd358c944
Updated revisions for files affected by gunzip module addition.
Vladimir Homutov <vl@nginx.com>
parents:
675
diff
changeset
|
13 rev="2"> |
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_static_module</literal> module allows |
966 | 19 sending precompressed files with the “<literal>.gz</literal>” |
330
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 filename extension instead of regular files. |
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 <para> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 This module is not built by default, it should be enabled with the |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <literal>--with-http_gzip_static_module</literal> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 configuration parameter. |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 </para> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 </section> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 <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
|
33 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 <para> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
330
diff
changeset
|
36 gzip_static on; |
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
330
diff
changeset
|
37 gzip_proxied expired no-cache no-store private auth; |
330
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 </example> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 </para> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 </section> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 |
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 <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
|
45 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 <directive name="gzip_static"> |
675
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
47 <syntax> |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
48 <literal>on</literal> | |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
49 <literal>off</literal> | |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
50 <literal>always</literal></syntax> |
330
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 <default>off</default> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <context>http</context> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 <context>server</context> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 <context>location</context> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <para> |
675
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
57 Enables (“<literal>on</literal>”) or disables (“<literal>off</literal>”) |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
58 checking the existence of precompressed files. |
330
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 The following directives are also taken into account: |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 <link doc="ngx_http_gzip_module.xml" id="gzip_http_version"/>, |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 <link doc="ngx_http_gzip_module.xml" id="gzip_proxied"/>, |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 <link doc="ngx_http_gzip_module.xml" id="gzip_disable"/>, |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 and <link doc="ngx_http_gzip_module.xml" id="gzip_vary"/>. |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 </para> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 <para> |
675
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
67 With the “<literal>always</literal>” value (1.3.6), gzipped file is used |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
68 in all cases, without checking if the client supports it. |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
69 It is useful if there are no uncompressed files on the disk anyway |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
70 or the <link doc="ngx_http_gunzip_module.xml">ngx_http_gunzip_module</link> |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
71 is used. |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
72 </para> |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
73 |
08140f6b7964
Documented gunzip module and corresponding changes.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
74 <para> |
330
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 The files can be compressed using the <command>gzip</command> command, |
966 | 76 or any other compatible one. |
330
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 It is recommended that the modification date and time of original and |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 compressed files be the same. |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 </para> |
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 </directive> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 </section> |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 |
f94bcab2a6ae
Translated ngx_http_gzip_module and ngx_http_gzip_static_module.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 </module> |