summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_deflate.xml.ko
blob: 68bdde87729f246162e1506c54bc0d9dca9342aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
<!-- English Revision: 1.12.2.4 (outdated: 1.12.2.8) -->

<!--
 Copyright 2003-2004 The Apache Software Foundation

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_deflate.xml.meta">

<name>mod_deflate</name>
<description>³»¿ëÀ» Ŭ¶óÀ̾ðÆ®·Î º¸³»±â Àü¿¡ ¾ÐÃàÇÑ´Ù</description>
<status>Extension</status>
<sourcefile>mod_deflate.c</sourcefile>
<identifier>deflate_module</identifier>

<summary>
    <p><module>mod_deflate</module> ¸ðµâÀº ¼­¹öÀÇ Ãâ·ÂÀ» ³×Æ®¿÷À¸·Î
    Ŭ¶óÀ̾ðÆ®¿¡ º¸³»±â Àü¿¡ ¾ÐÃàÇÏ´Â <code>DEFLATE</code> Ãâ·ÂÇÊÅ͸¦
    Á¦°øÇÑ´Ù.</p>
</summary>
<seealso><a href="../filter.html">ÇÊÅÍ</a></seealso>

<section id="recommended"><title>±ÇÀåÇÏ´Â ¼³Á¤</title>
    <p>±ÞÇÑ »ç¶÷À» À§ÇÑ °ßº» ¼³Á¤ÀÌ´Ù. ±×·¯³ª ½Ã°£À» °¡Áö°í
    ¾Æ·¡ ÀÚ¼¼ÇÑ ¼³¸íÀ» ÀÐ±æ ¹Ù¶õ´Ù!</p>

    <example><title>ÀϺΠtype¸¸ ¾ÐÃà</title>
      AddOutputFilterByType DEFLATE text/html text/plain text/xml
    </example>

    <example><title>À̹ÌÁö¸¦ Á¦¿ÜÇÑ ¸ðµç °ÍÀ» ¾ÐÃà</title>
      &lt;Location /&gt;<br />
      <indent>
        # ÇÊÅ͸¦ Ãß°¡ÇÑ´Ù<br />
        SetOutputFilter DEFLATE<br />
        <br />
        # Netscape 4.x¿¡ ¹®Á¦°¡ ÀÖ´Ù...<br />
        BrowserMatch ^Mozilla/4         gzip-only-text/html<br />
        <br />
        # Netscape 4.06-4.08¿¡ ´õ ¹®Á¦°¡ ÀÖ´Ù<br />
        BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
        <br />
        # MSIEÀº Netscape¶ó°í ÀÚ½ÅÀ» ¾Ë¸®Áö¸¸, ¹®Á¦°¡ ¾ø´Ù<br />
        BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html<br />
        <br />
        # À̹ÌÁö¸¦ ¾ÐÃàÇÏÁö ¾Ê´Â´Ù<br />
        SetEnvIfNoCase Request_URI \<br />
        <indent>
          \.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
        </indent>
        <br />
        # ÇÁ·Ï½Ã°¡ À߸øµÈ ³»¿ëÀ» Àü´ÞÇÏÁö¾Êµµ·Ï ÇÑ´Ù<br />
        Header append Vary User-Agent env=!dont-vary<br />
      </indent>
      &lt;/Location&gt;
    </example>

</section>

<section id="enable"><title>¾ÐÃàÇϱâ</title>

    <section id="output"><title>Ãâ·Â ¾ÐÃà</title>
      <p><code>DEFLATE</code> <a href="../filter.html">ÇÊÅÍ</a>°¡
      ¾ÐÃàÀ» ÇÑ´Ù. ´ÙÀ½ Áö½Ã¾î´Â Áö½Ã¾î°¡ ÀÖ´Â À§Ä¡ÀÇ ¹®¼­¸¦
      ¾ÐÃàÇÑ´Ù:</p>

      <example>
        SetOutputFilter DEFLATE
      </example>

      <p>¸ðµç ³»¿ëÀ» ¾ÐÃàÇϸé ó¸®ÇÏÁö ¸øÇÏ´Â ºê¶ó¿ìÀú°¡ Àֱ⶧¹®¿¡
      html ÆÄÀϸ¸À» ¾ÐÃàÇϱâÀ§ÇØ (¾Æ·¡ Âü°í)
      <code>gzip-only-text/html</code>À» <code>1</code>·Î ¼³Á¤ÇÒÁöµµ
      ¸ð¸¥´Ù. À̸¦ <em><code>1</code>ÀÌ ¾Æ´Ñ °ªÀ¸·Î</em> ¼³Á¤Çϸé
      ¹«½ÃÇÑ´Ù.</p>
      
      <p>º¸Åë Ưº°ÇÑ MIME type¸¸ ¾ÐÃàÇÏ·Á¸é <directive module="core"
      >AddOutputFilterByType</directive> Áö½Ã¾î¸¦ »ç¿ëÇÑ´Ù.
      ´ÙÀ½ ¼³Á¤Àº html ÆÄÀϸ¸À» ¾ÐÃàÇÑ´Ù:</p>

      <example>
        &lt;Directory "/your-server-root/manual"&gt;<br />
        <indent>
          AddOutputFilterByType DEFLATE text/html<br />
        </indent>
        &lt;/Directory&gt;
      </example>

      <p>¾ÐÃàÇÑ ÆÄÀÏÀ» ó¸®ÇÏÁö ¸øÇÏ´Â ºê¶ó¿ìÀú¿¡°Ô´Â ¾ÐÃàÇÏÁö¾Ê°í
      º¸³»±æÀ§ÇØ <directive module="mod_setenvif"
      >BrowserMatch</directive> Áö½Ã¾î¿¡ <code>no-gzip</code>À»
      ¼³Á¤ÇÑ´Ù. ÃÖÀûÀÇ °á°ú¸¦ ¾ò±âÀ§ÇØ <code>no-gzip</code>°ú
      <code>gzip-only-text/html</code>À» °°ÀÌ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
      ÀÌ °æ¿ì ÀüÀÚ°¡ ÈÄÀÚ¸¦ ¹«½ÃÇÑ´Ù. À§ ÀýÀÇ <a
      href="#recommended">¼³Á¤ ¿¹Á¦</a> ÀϺθ¦ »ìÆ캸ÀÚ:</p>

      <example>
        BrowserMatch ^Mozilla/4         gzip-only-text/html<br />
        BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
        BrowserMatch \bMSIE             !no-gzip !gzip-only-text/html
      </example>

      <p>¸ÕÀú <code>User-Agent</code> ¹®ÀÚ¿­À» º¸°í Netscape
      Navigator ¹öÀü 4.xÀÎÁö °Ë»çÇÑ´Ù. ÀÌ ¹öÀüÀº <code>text/html</code>ÀÌ
      ¾Æ´Ñ typeÀÇ ¾ÐÃàÀ» ó¸®ÇÏÁö ¸øÇÑ´Ù. ¹öÀü 4.06, 4.07, 4.08Àº
      html ÆÄÀÏ ¾ÐÃàÀ» ó¸®Çϴ´뵵 ¹®Á¦°¡ ÀÖ´Ù. ±×·¡¼­ ¿ì¸®´Â
      ÀÌ °æ¿ì deflate ÇÊÅ͸¦ ¿ÏÀüÈ÷ »ç¿ëÇÏÁö¾Ê´Â´Ù.</p>

      <p>¼¼¹ø° <directive module="mod_setenvif">BrowserMatch</directive>
      Áö½Ã¾î´Â Microsoft Internet Explorer°¡ ÀÚ½ÅÀ» "Mozilla/4"·Î
      ¾Ë¸®Áö¸¸ ¾ÐÃàµÈ ¿äûÀ» ó¸®ÇÒ ¼ö Àֱ⶧¹®¿¡ user agent
      ÃßÃøÀ» ¼öÁ¤ÇÑ´Ù. <code>User-Agent</code> Çì´õ¿¡¼­ "MSIE"
      (<code>\b</code>´Â "´Ü¾î °æ°è"¸¦ ¶æÇÑ´Ù) ¹®ÀÚ¿­À» ¹ß°ßÇϸé
      ¾Õ¿¡¼­ ¼³Á¤ÇÑ Á¦¾àÀ» Ǭ´Ù.</p>

      <note><title>ÁÖÀÇ</title>
        <code>DEFLATE</code> ÇÊÅÍ´Â Ç×»ó PHP³ª SSI¿Í °°Àº RESOURCE
        ÇÊÅÍ µÚ¿¡ µé¾î°£´Ù. ¶Ç, ³»ºÎ ÇÏÀ§¿äû(subrequest)¿¡ ¿µÇâÀ»
        ÁÖÁö ¾Ê´Â´Ù.
      </note>
    </section>

    <section id="input"><title>ÀÔ·Â ¾ÐÃàÇ®±â</title>
      <p><module>mod_deflate</module> ¸ðµâÀº ¿äûÀÇ gzip ¾ÐÃàµÈ
      ³»¿ëÀ» Ǫ´Â ÇÊÅ͵µ Á¦°øÇÑ´Ù. ÀÌ ±â´ÉÀ» »ç¿ëÇÏ·Á¸é ´ÙÀ½°ú
      °°ÀÌ <directive module="core">SetInputFilter</directive>³ª
      <directive module="mod_mime">AddInputFilter</directive>¸¦
      »ç¿ëÇÏ¿© ÀÔ·ÂÇÊÅͼø¼­¿¡ <code>DEFLATE</code> ÇÊÅ͸¦
      Ãß°¡ÇؾßÇÑ´Ù:</p>

      <example>
        &lt;Location /dav-area&gt;<br />
        <indent>
          SetInputFilter DEFLATE<br />
        </indent>
        &lt;/Location&gt;
      </example>
      
      <p>¿äû¿¡ <code>Content-Encoding: gzip</code> Çì´õ°¡ ÀÖ´Ù¸é
      ÀÚµ¿À¸·Î ¾ÐÃàµÈ ³»¿ëÀ» Ǭ´Ù. gzip ¿äûÀ» ÇÒ ¼ö ÀÖ´Â
      ºê¶ó¿ìÀú´Â µå¹°´Ù. ±×·¯³ª ¾î¶² <a
      href="http://www.webdav.org">WebDAV</a> Ŭ¶óÀ̾ðÆ®¿Í °°Àº
      Ưº°ÇÑ ÇÁ·Î±×·¥Àº ¿äû ¾ÐÃàÀ» Áö¿øÇÑ´Ù.</p>

      <note type="warning"><title>Content-Length¿¡ ´ëÇÑ ÁÖÀÇ</title>
        <p>¿äû ³»¿ëÀ» Á÷Á¢ »ìÆ캻´Ù¸é, <em><code>Content-Length</code>
        Çì´õ¸¦ ¹ÏÁö¸¶¶ó!</em> Content-Length Çì´õ´Â Ŭ¶óÀ̾ðÆ®°¡
        º¸³½ ³»¿ëÀÇ ±æÀÌÀÌÁö, ¾ÐÃàÀ» Ǭ °á°úÀÇ ¹ÙÀÌÆ®¼ö°¡
        <em>¾Æ´Ï´Ù</em>.</p>
      </note>
    </section>
</section>

<section id="proxies"><title>ÇÁ·Ï½Ã ¼­¹ö ´Ù·ç±â</title>

    <p><module>mod_deflate</module> ¸ðµâÀº ÇÁ·Ï½Ã°¡ ÀÚ½ÅÀÌ Ä³½¬ÇÑ
    ÀÀ´äÀ» ÀûÀýÇÑ <code>Accept-Encoding</code> ¿äû Çì´õ¸¦ º¸³½
    Ŭ¶óÀ̾ðÆ®¿¡°Ô¸¸ º¸³»µµ·Ï <code>Vary:
    Accept-Encoding</code> HTTP ÀÀ´ä Çì´õ¸¦ Ãß°¡ÇÑ´Ù. ±×·¡¼­
    ¾ÐÃàµÈ ³»¿ëÀ» ÀÌÇØÇÒ ¼ö ¾ø´Â Ŭ¶óÀ̾ðÆ®¿¡ ¾ÐÃàµÈ ³»¿ëÀ»
    º¸³»Áö¾Êµµ·Ï ÇÑ´Ù.</p>

    <p>¿¹¸¦ µé¾î, <code>User-Agent</code> Çì´õ µî¿¡ µû¶ó Ưº°È÷
    ÇÊÅÍ Àû¿ëÀ» Ãë¼ÒÇÑ´Ù¸é, ÇÁ·Ï½Ã¿¡°Ô ÀÌ·¯ÇÑ Á¦ÇÑÀ» ¾Ë·ÁÁÖ±âÀ§ÇØ
    Á÷Á¢ <code>Vary</code> Çì´õ¿¡ Ãß°¡ÇØ¾ß ÇÑ´Ù. ¿¹¸¦ µé¾î,
    ¼³Á¤ÀÌ <code>User-Agent</code>¿¡ µû¶ó <code>DEFLATE</code>
    ÇÊÅ͸¦ Ãß°¡ÇÑ´Ù¸é ´ÙÀ½À» »ç¿ëÇÑ´Ù:</p>

    <example>
      Header append Vary User-Agent
    </example>
    
    <p>¿äû Çì´õ¿ÜÀÇ ´Ù¸¥ Á¤º¸¿¡ (<em>¿¹¸¦ µé¾î</em>, HTTP ¹öÀü)
    µû¶ó ¾ÐÃà ¿©ºÎ°¡ °áÁ¤µÈ´Ù¸é, <code>Vary</code> Çì´õ°ªÀ»
    <code>*</code>·Î ¼³Á¤ÇØ¾ß ÇÑ´Ù. ±×·¯¸é Ç¥ÁØÀ» µû¸£´Â ÇÁ·Ï½Ã´Â
    ij½ÌÀ» ÇÏÁö ¾Ê°Ô µÈ´Ù.</p>

    <example><title>¿¹Á¦</title>
      Header set Vary *
    </example>
</section>

<directivesynopsis>
<name>DeflateFilterNote</name>
<description>¾ÐÃà·üÀ» ·Î±×¿¡ ±â·ÏÇÑ´Ù</description>
<syntax>DeflateFilterNote [<var>type</var>] <var>notename</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<compatibility><var>type</var> is available since Apache 2.0.45</compatibility>

<usage>
    <p><directive>DeflateFilterNote</directive> Áö½Ã¾î´Â ¿äûÀÇ
    ¾ÐÃà·üÀ» ·Î±×¿¡ ±â·ÏÇÏ´Â ±âÈ£¸¦ ÁöÁ¤ÇÑ´Ù. ±âÈ£ À̸§Àº Áö½Ã¾î·Î
    ÁöÁ¤ÇÑ °ªÀÌ´Ù. Åë°è¸¦ À§ÇØ <a href="../logs.html#accesslog">Á¢±Ù
    ·Î±×</a>¿¡¼­ ±âÈ£¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>

    <example><title>¿¹Á¦</title>
      DeflateFilterNote ratio<br />
      <br />
      LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate<br />
      CustomLog logs/deflate_log deflate
    </example>

    <p>·Î±×¿¡¼­ ´õ Á¤È®ÇÑ °ªÀ» ÃßÃâÇÏ·Á¸é <var>type</var> ¾Æ±Ô¸ÕÆ®·Î
    ±â·ÏÇÒ ÀڷḦ ¼±ÅÃÇÑ´Ù. <var>type</var>´Â ´ÙÀ½Áß ÇϳªÀÌ´Ù:</p>

    <dl>
      <dt><code>Input</code></dt>
      <dd>ÇÊÅÍ ÀԷ½ºÆ®¸²ÀÇ ¹ÙÀÌÆ®¼ö¸¦ ÀúÀåÇÑ´Ù.</dd>

      <dt><code>Output</code></dt>
      <dd>ÇÊÅÍ Ãâ·Â½ºÆ®¸²ÀÇ ¹ÙÀÌÆ®¼ö¸¦ ÀúÀåÇÑ´Ù..</dd>

      <dt><code>Ratio</code></dt>
      <dd>¾ÐÃà·üÀ» (<code>output/input * 100</code>) ÀúÀåÇÑ´Ù.
       <var>type</var> ¾Æ±Ô¸ÕÆ®¸¦ »ý·«ÇÏ¸é »ç¿ëÇÏ´Â ±âº»°ªÀÌ´Ù.</dd>
    </dl>

    <p>±×·¡¼­ ÀÌ·¸°Ô ·Î±×¿¡ ±â·ÏÇÒ ¼ö ÀÖ´Ù:</p>

    <example><title>Á¤¹ÐÇÑ ·Î±×</title>
      DeflateFilterNote Input instream<br />
      DeflateFilterNote Output outstream<br />
      DeflateFilterNote Ratio ratio<br />
      <br />
      LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate<br />
      CustomLog logs/deflate_log deflate
    </example>
</usage>
<seealso><module>mod_log_config</module></seealso>
</directivesynopsis>

<directivesynopsis>
<name>DeflateBufferSize</name>
<description>zlibÀÌ Çѹø¿¡ ¾ÐÃàÇÒ Å©±â</description>
<syntax>DeflateBufferSize <var>value</var></syntax>
<default>DeflateBufferSize 8096</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>DeflateBufferSize</directive> Áö½Ã¾î´Â zlibÀÌ
    Çѹø¿¡ ¾ÐÃàÇÒ ¹ÙÀÌÆ®¼ö¸¦ ÁöÁ¤ÇÑ´Ù.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>DeflateWindowSize</name>
<description>Zlib ¾ÐÃà window size</description>
<syntax>DeflateWindowSize <var>value</var></syntax>
<default>DeflateWindowSize 15</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>DeflateWindowSize</directive> Áö½Ã¾î´Â zlib
    ¾ÐÃà window size¸¦ (1°ú 15 »çÀÌÀÇ °ª) ÁöÁ¤ÇÑ´Ù. ÀϹÝÀûÀ¸·Î
    window size°¡ Ŭ¼ö·Ï ¾ÐÃà·üÀÌ Áõ°¡ÇÑ´Ù.</p>
</usage>
</directivesynopsis>

<directivesynopsis>

<name>DeflateMemLevel</name>
<description>zlibÀÌ ¾ÐÃàÇÒ¶§ »ç¿ëÇÏ´Â ¸Þ¸ð¸®·®</description>
<syntax>DeflateMemLevel <var>value</var></syntax>
<default>DeflateMemLevel 9</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>

<usage>
    <p><directive>DeflateMemLevel</directive> Áö½Ã¾î´Â zlibÀÌ
    ¾ÐÃàÇÒ¶§ ¾ó¸¶¸¸Å­ ¸Þ¸ð¸®¸¦ »ç¿ëÇÒÁö °áÁ¤ÇÑ´Ù. (1°ú 9 »çÀÌÀÇ
    °ª)</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>DeflateCompressionLevel</name>
<description>Ãâ·ÂÀ» ¾ó¸¸Å­ ¾ÐÃàÇϴ°¡</description>
<syntax>DeflateCompressionLevel <var>value</var></syntax>
<default>Zlib's default</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<compatibility>This directive is available since Apache 2.0.45</compatibility>

<usage>
    <p><directive>DeflateCompressionLevel</directive> Áö½Ã¾î´Â
        »ç¿ëÇÒ ¾ÐÃà¼öÁØÀ» ¼±ÅÃÇÑ´Ù. °ªÀÌ Å¬¼ö·Ï ¾ÐÃà·üÀÌ Áõ°¡ÇÏÁö¸¸,
        CPU¸¦ ´õ ¸¹ÀÌ »ç¿ëÇÑ´Ù.</p>
    <p>(°¡Àå ´ú ¾ÐÃà) 1°ú (°¡Àå ¸¹ÀÌ ¾ÐÃà) 9 »çÀÌÀÇ °ªÀ» ÁöÁ¤ÇÑ´Ù.</p>
</usage>
</directivesynopsis>


</modulesynopsis>