blob: 6d157ed5cb7c1303ef9c604c3f583c9bc21c6103 [file] [log] [blame]
<?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: 420990:1334016 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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>