summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_expires.xml.ko
blob: fe909f1a093b718c45f33ee02ac6107306792944 (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
<?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: 104550 -->

<!--
 Copyright 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_expires.xml.meta">

<name>mod_expires</name>
<description>»ç¿ëÀÚ°¡ ÁöÁ¤ÇÑ ±âÁØ¿¡ µû¶ó <code>Expires</code>¿Í
<code>Cache-Control</code> HTTP Çì´õ¸¦ »ý¼ºÇÑ´Ù</description>
<status>Extension</status>
<sourcefile>mod_expires.c</sourcefile>
<identifier>expires_module</identifier>

<summary>
    <p>ÀÌ ¸ðµâÀº ¼­¹ö ÀÀ´äÀÇ <code>Expires</code> HTTP Çì´õ¿Í
    <code>Cache-Control</code> HTTP Çì´õÀÇ <code>max-age</code>
    Áö½Ã¾î ¼³Á¤À» Á¶ÀýÇÑ´Ù. ¸¸±âÀÏÀ» ÆÄÀÏÀÌ ¸¶Á÷¸· ¼öÁ¤µÈ ½Ã°£
    ȤÀº Ŭ¶óÀ̾ðÆ®°¡ Á¢¼ÓÇÑ ½Ã°£¿¡ »ó´ëÀûÀ¸·Î ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.</p>

    <p>ÀÌ HTTP Çì´õµéÀº Ŭ¶óÀ̾ðÆ®¿¡°Ô ¹®¼­ÀÇ
    À¯È¿¼º°ú Áö¼Ó¼ºÀ» ¾Ë·ÁÁØ´Ù. ÀÌ ½Ã°£ÀÌ ¾ÆÁ÷ Áö³ªÁö¾Ê¾Ò´Ù¸é,
    ¹®¼­¸¦ ij½¬¿¡¼­ °¡Á®¿Íµµ µÈ´Ù. ¸¸±âÀÏÀÌ Áö³µ´Ù¸é ij½¬µÈ
    °ÍÀ» "¸¸·áµÇ°í" À¯È¿ÇÏÁö ¾Ê´Ù°í °£ÁÖÇÏ¿©, ¼Ò½º¿¡¼­ ¹®¼­¸¦
    »õ·Î ¾ò¾î¿Í¾ß ÇÑ´Ù.</p>

    <p><directive module="mod_headers">Header</directive> Áö½Ã¾î¸¦
    »ç¿ëÇÏ¿© <code>max-age</code> ¿ÜÀÇ ´Ù¸¥
    <code>Cache-Control</code> Áö½Ã¾î(<a
    href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9">RFC
    2616, 14.9 Àý</a> Âü°í)¸¦ ¼öÁ¤ÇÒ ¼ö ÀÖ´Ù.</p>

</summary>

<section id="AltSyn"><title>´Ù¸¥ ³»ºÎ ¹®¹ý</title>
    <p><directive module="mod_expires">ExpiresDefault</directive>¿Í
    <directive module="mod_expires">ExpiresByType</directive>
    Áö½Ã¾î¸¦ ´õ Àбâ ÁÁÀº Çü½ÄÀ¸·Î ±â¼úÇÒ ¼ö ÀÖ´Ù:</p>

    <example>
      ExpiresDefault "&lt;base&gt; [plus] {&lt;num&gt;
      &lt;type&gt;}*"<br />
      ExpiresByType type/encoding "&lt;base&gt; [plus]
      {&lt;num&gt; &lt;type&gt;}*"
    </example>

    <p>&lt;base&gt;´Â ´ÙÀ½Áß ÇϳªÀÌ´Ù:</p>

    <ul>
      <li><code>access</code></li>

      <li><code>now</code> ('<code>access</code>'¿Í °°À½)</li>

      <li><code>modification</code></li>
    </ul>

    <p><code>plus</code> Å°¿öµå´Â ¾ø¾îµµ µÈ´Ù. &lt;num&gt;Àº
    [<code>atoi()</code>¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â] Á¤¼ö°ªÀÌ´Ù.
    &lt;type&gt;Àº ´ÙÀ½Áß ÇϳªÀÌ´Ù:</p>

    <ul>
      <li><code>years</code></li>
      <li><code>months</code></li>
      <li><code>weeks</code></li>
      <li><code>days</code></li>
      <li><code>hours</code></li>
      <li><code>minutes</code></li>
      <li><code>seconds</code></li>
    </ul>

    <p>¿¹¸¦ µé¾î, ´ÙÀ½ ¸ðµÎ´Â ¹®¼­°¡ ±âº»ÀûÀ¸·Î Á¢¼ÓµÈÁö 1´ÞÈÄ¿¡
    ¸¸±âµÈ´Ù°í ¼³Á¤ÇÑ´Ù:</p>

    <example>
      ExpiresDefault "access plus 1 month"<br />
      ExpiresDefault "access plus 4 weeks"<br />
      ExpiresDefault "access plus 30 days"
    </example>

    <p>'&lt;num&gt; &lt;type&gt;' ±¸¹®À» ¹Ýº¹Çؼ­ »ç¿ëÇÏ¿©
    ¸¸±â½Ã°£À» ÀÚ¼¼È÷ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù:</p>

    <example>
      ExpiresByType text/html "access plus 1 month 15
      days 2 hours"<br />
      ExpiresByType image/gif "modification plus 5 hours 3
      minutes"
    </example>

    <p>¸¸¾à ¼öÁ¤½Ã°£(modification)À» ±âÁØÀ¸·Î ¸¸±â½Ã°£À» ¼³Á¤ÇÏ´Â
    °æ¿ì ³»¿ëÀ» µð½ºÅ©¿¡ ÀÖ´Â ÆÄÀÏ¿¡¼­ °¡Á®¿ÀÁö ¾Ê´Â´Ù¸é Expires
    Çì´õ¸¦ ºÙÀÌÁö <strong>¾Ê´Â´Ù</strong>. ÀÌ °æ¿ì ³»¿ë¿¡ ¼öÁ¤½Ã°£ÀÌ
    ¾ø±â ¶§¹®ÀÌ´Ù.</p>
</section>

<directivesynopsis>
<name>ExpiresActive</name>
<description><code>Expires</code> Çì´õ¸¦ »ý¼ºÇÑ´Ù</description>
<syntax>ExpiresActive On|Off</syntax>
<contextlist><context>server config</context>
<context>virtual host</context><context>directory</context>
<context>.htaccess</context></contextlist>
<override>Indexes</override>

<usage>
    <p>ÀÌ Áö½Ã¾î´Â ÇØ´ç ¿µ¿ª¿¡ ´ëÇØ (Áï, <code>.htaccess</code>
    ÆÄÀÏ¿¡¼­ »ç¿ëÇÑ´Ù¸é ±× µð·ºÅ丮 ¾Æ·¡¿¡ ÀÖ´Â ¹®¼­µé¸¸ ÇØ´çµÈ´Ù.)
    <code>Expires</code>¿Í <code>Cache-Control</code> Çì´õ¸¦
    »ý¼ºÇÒÁö À¯¹«¸¦ °áÁ¤ÇÑ´Ù. (<code>.htaccess</code> ÆÄÀÏ µîÀ¸·Î
    ´õ ÇÏÀ§ ´Ü°è¿¡¼­ ¼­¹ö¼³Á¤À» º¯°æÇÏÁö¾Ê´Â ÇÑ)
    <code>Off</code>À̸é ÇØ´ç ¿µ¿ª¿¡ ÀÖ´Â ¹®¼­¿¡ À̵é Çì´õ¸¦
    »ý¼ºÇÏÁö ¾Ê´Â´Ù. <code>On</code>À̸é <directive
    module="mod_expires">ExpiresByType</directive>°ú <directive
    module="mod_expires">ExpiresDefault</directive> Áö½Ã¾î·Î
    (<em>ÇØ´ç Ç׸ñÀ» Âü°íÇ϶ó</em>) ÁöÁ¤ÇÑ ±ÔÄ¢¿¡ µû¶ó ¼­ºñ½ºÇÏ·Á´Â
    ¹®¼­¿¡ ÀÌ Çì´õµéÀ» »ý¼ºÇÑ´Ù.</p>

    <p>ÀÌ Áö½Ã¾î°¡ <code>Expires</code>³ª <code>Cache-Control</code>
    Çì´õ¸¦ º¸ÀåÇÏÁö´Â ¾Ê´Â´Ù. ±ÔÄ¢¿¡ ÇØ´çÇÏÁö ¾Ê´Ù¸é ¸¶Ä¡ ÀÌ
    Áö½Ã¾î°¡ ¾ø´Â °Íó·³ Çì´õ¸¦ ¸¸µéÁö ¾Ê´Â´Ù.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>ExpiresByType</name>
<description>MIME typeÀ¸·Î <code>Expires</code> Çì´õ°ªÀ» ¼³Á¤ÇÑ´Ù</description>
<syntax>ExpiresByType <var>MIME-type</var>
<var>&lt;code&gt;seconds</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context></contextlist>
<override>Indexes</override>

<usage>
    <p>ÀÌ Áö½Ã¾î´Â ƯÁ¤ Á¾·ùÀÇ (<em>¿¡¸¦ µé¾î</em>,
    <code>text/html</code>) ¹®¼­¿¡ ´ëÇÑ <code>Expires</code>
    Çì´õ°ª°ú <code>Cache-Control</code> Çì´õÀÇ <code>max-age</code>
    Áö½Ã¾î°ªÀ» Á¤ÀÇÇÑ´Ù. µÎ¹ø° ¾Æ±Ô¸ÕÆ®´Â ¸¸±â½Ã°£À» °áÁ¤ÇÒ¶§
    ±âÁØ ½Ã°£¿¡ ´õÇÒ ÃÊ´ÜÀ§ °ªÀ» ÁöÁ¤ÇÑ´Ù. <code>Cache-Control:
    max-age</code>´Â ¸¸±â½Ã°£¿¡¼­ ¿äûÇÑ ½Ã°£À» »©¼­ °è»êÇÏ°í,
    °á°ú´Â ÃÊ´ÜÀ§·Î Ç¥½ÃÇÑ´Ù.</p>

    <p>±âÁØ ½Ã°£Àº ÆÄÀÏÀÇ ÃÖ±Ù ¼öÁ¤½Ã°£ ȤÀº Ŭ¶óÀ̾ðÆ®°¡ ¹®¼­¿¡
    Á¢±ÙÇÑ ½Ã°£ÀÌ´Ù. À̶² °ÍÀ» »ç¿ëÇÒÁö´Â
    <code><var>&lt;code&gt;</var></code> Çʵå·Î °áÁ¤ÇØ¾ß ÇÑ´Ù.
    <code>M</code>Àº ±âÁØ ½Ã°£À¸·Î ÆÄÀÏÀÇ ÃÖ±Ù ¼öÁ¤½Ã°£À»
    »ç¿ëÇÏ°í, <code>A</code>´Â Ŭ¶óÀ̾ðÆ®ÀÇ Á¢±Ù ½Ã°£À» »ç¿ëÇÑ´Ù.</p>

    <p>Â÷ÀÌ´Â ¹Ì¹¦ÇÏ´Ù. <code>M</code>À» »ç¿ëÇϸé ij½¬¿¡ ÀÖ´Â
    ¸ðµç º¹»çº»ÀÌ °°Àº ½Ã°£¿¡ ¸¸·áµÈ´Ù. ±×·¡¼­ Ç×»ó °°Àº URL·Î
    ã¾Æº¼ ¼ö ÀÖ´Â ÁÖ°£ÀÏÁ¤ °°Àº ¿ëµµ¿¡ ÁÁ´Ù. <code>A</code>¸¦
    »ç¿ëÇÏ¸é º¹»çº»ÀÇ ¸¸±â½Ã°£ÀÌ °¢°¢ ´Ù¸£´Ù. ÀÌ´Â ÀÚÁÖ ¼öÁ¤µÇÁö¾Ê´Â
    ±×¸²ÆÄÀÏ¿¡, ƯÈ÷ ¿©·¯ ¹®¼­¿¡¼­ °°Àº ±×¸²À» ÂüÁ¶ÇÒ¶§ (<em>¿¹¸¦
    µé¾î</em>, À̹ÌÁö´Â »ó´ëÀûÀ¸·Î ªÀº ±â°£µ¿¾È ¹Ýº¹Çؼ­ Á¢±ÙµÈ´Ù),
    À¯¿ëÇÏ´Ù.</p>

    <example><title>¿¹Á¦:</title>
      # ¸¸±âÇì´õ¸¦ »ç¿ëÇÑ´Ù<br />
      ExpiresActive On<br />
      # Ŭ¶óÀ̾ðÆ® ij½¬ÀÇ GIF ±×¸²Àº ÇÑ ´ÞÈÄ¿¡ ¸¸±âÇÑ´Ù<br />
      ExpiresByType image/gif A2592000<br />
      # HTML ¹®¼­´Â º¯°æÈÄ ÀÏÁÖÀÏ°£ À¯È¿ÇÏ´Ù
      ExpiresByType text/html M604800
    </example>

    <p>ÀÌ Áö½Ã¾î´Â <code>ExpiresActive On</code>À» »ç¿ëÇÒ¶§¸¸
    À¯È¿ÇÔÀ» ÁÖÀÇÇ϶ó. <directive
    module="mod_expires">ExpiresDefault</directive> Áö½Ã¾î¸¦
    »ç¿ëÇÏ¿© ƯÁ¤ MIME type¿¡ ´ëÇؼ­<em>¸¸</em> ¸¸±â½Ã°£À»
    ¼³Á¤ÇÒ ¼ö ÀÖ´Ù.</p>

    <p>¾Õ¿¡¼­ ¼³¸íÇÑ <a href="#AltSyn">´Ù¸¥ ¹®¹ý</a>À» »ç¿ëÇÏ¿©
    ¸¸±â½Ã°£À» °è»êÇÒ ¼öµµ ÀÖ´Ù.</p>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>ExpiresDefault</name>
<description>¸¸±â½Ã°£À» °è»êÇÏ´Â ±âº» ¾Ë°í¸®Áò</description>
<syntax>ExpiresDefault <var>&lt;code&gt;seconds</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
<context>directory</context><context>.htaccess</context></contextlist>
<override>Indexes</override>

<usage>
    <p>ÀÌ Áö½Ã¾î´Â ÇØ´ç ¿µ¿ª¿¡ ÀÖ´Â ¸ðµç ¹®¼­ÀÇ ¸¸±â½Ã°£À»
    °è»êÇÏ´Â ±âº» ¾Ë°í¸®ÁòÀ» ÁöÁ¤ÇÑ´Ù. <directive
    module="mod_expires">ExpiresByType</directive> Áö½Ã¾î¸¦
    »ç¿ëÇÏ¿© Á¾·ùº°·Î ¼³Á¤ÇÒ ¼ö ÀÖ´Ù. ¾Æ±Ô¸ÕÆ® ¹®¹ý¿¡ ´ëÇÑ
    ÀÚ¼¼ÇÑ ¼³¸íÀº ±× Áö½Ã¾î¿Í <a href="#AltSyn">´Ù¸¥ ¹®¹ý</a>À»
    Âü°íÇ϶ó.</p>
</usage>
</directivesynopsis>
</modulesynopsis>