<-
Apache > HTTP Server > Documentation > µâ

ÄÄ µâ mod_expires 1r3i2

ƢÉÇÑ î:  ko 

ÀÌ Â ÃÖÅÇ ÀÌ ÕÏÙ. ÃÖÙ ¯ƩµÈ »ëÀ µî ¦ ÂüíÇÏä.
í: »çëÀÚƢ ÁöÁÇÑ âÁ µûó ExpiresÍ Cache-Control HTTP Çìõ¦ »ýÇÑÙ
»óÅÂ: Extension
惡: expires_module
ÒÄÀÏ: mod_expires.c

äà 2z375a

ÀÌ µâÀ ö ÀÀäÀÇ Expires HTTP ÇìõÍ Cache-Control HTTP ÇìõÀÇ max-age ÁöÃî ÁÀ» ÁÀýÇÑÙ. âÀÏÀ» ÄÀÏÀÌ Á öÁµÈ ã ÈÀ ŬóÀÌƢ Á¢ÓÇÑ Ã£ »óëÀûÀÎ ÁÇÒ ö ÀÖÙ.

ÀÌ HTTP ÇìõµéÀ ŬóÀÌ碯Ô ÀÇ À¯Èú ÁöÓÀ» ËÁÁÙ. ÀÌ Ã£ÀÌ Á ÁöÁöÊÒÙé, ¦ Ĭ ƢÁ碯͵µ µÈÙ. âÀÏÀÌ ÁöµÙé ĬµÈ ÍÀ» "áµÇí" À¯ÈÇÏÁö ÊÙí £ÁÖÇÏ©, Ò ¦ »õÎ òîÍ ÇÑÙ.

Header ÁöÃî¦ »çëÇÏ© max-age ÜÀÇ Ù¥ Cache-Control ÁöÃî(RFC 2616, 14.9 Àý Âüí)¦ öÁÇÒ ö ÀÖÙ.

 Apache!

ÁÖÁ¦ 2c3c50

ÁöÃîµé 2l4o6j

Bugfix checklist 4i2533

Âüí 251y31

top

Ù¥ »Î ý 1m6v6j

ExpiresByType ÁöÃî¦ õ Àâ ÁÁÀ ÇüÄÀÎ âúÇÒ ö ÀÖÙ:

ExpiresDefault "<base> [plus] {<num> <type>}*"
ExpiresByType type/encoding "<base> [plus] {<num> <type>}*"

<base>Â ÙÀÁ ÇÏÀÌÙ:

plus ÅƢöµå  µÈÙ. <num>À [atoi() »çëÇÒ ö ÀÖÂ] ÁöƨÀÌÙ. <type>À ÙÀÁ ÇÏÀÌÙ:

¦ µéî, ÙÀ µÎ Ƣ â»ÀûÀÎ Á¢ÓµÈÁö 1ÈÄ âµÈÙí ÁÇÑÙ:

ExpiresDefault "access plus 1 month"
ExpiresDefault "access plus 4 weeks"
ExpiresDefault "access plus 30 days"

'<num> <type>' À» ÝÇ »çëÇÏ© âãÀ» ÀÚÈ ÁÇÒ ö ÀÖÙ:

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

à öÁã(modification)À» âÁÀÎ âãÀ» ÁÇÏ Ʃì »ëÀ» µÅ© ÀÖ ÄÀÏ ƢÁ碯ÀÁö ÊÂÙé Expires Çìõ¦ ÙÀÌÁö ÊÂÙ. ÀÌ Ʃì »ë öÁãÀÌ â ҡשÀÌÙ.

top

ExpiresActive ÁöÃî 3i2g2a

í: Expires Çìõ¦ »ýÇÑÙ
ý: ExpiresActive On|Off
»çëÀåÒ: ÁÖöÁ, Ƣ»óÈ£, directory, .htaccess
Override ÉÇ: Indexes
»óÅÂ: Extension
µâ: mod_expires

ÀÌ ÁöÃî Çç µ ëÇ (Áï, .htaccess ÄÀÏ »çëÇÑÙé µÅä ÀÖ µé ÇçµÈÙ.) ExpiresÍ Cache-Control Çìõ¦ »ýÇÒÁö À¯«¦ áÁÇÑÙ. (.htaccess ÄÀÏ µîÀÎ õ ÇÏÀ Üè öÁÀ» ¯ƩÇÏÁöÊ ÇÑ) OffÀÌé Çç µ ÀÖ À̵é Çìõ¦ »ýÇÏÁö ÊÂÙ. OnÀÌé ExpiresDefault ÁöÃîÎ (Çç ÇñÀ» ÂüíÇÏó) ÁöÁÇÑ ÔÄ¢ µûó ñÇÏÁ ÀÌ ÇìõµéÀ» »ýÇÑÙ.

ÀÌ ÁöÃîƢ Expires Cache-Control Çìõ¦ ÀåÇÏÁö ÊÂÙ. ÔÄ¢ ÇçÇÏÁö ÊÙé Ä ÀÌ ÁöÃîƢ  Íà Çìõ¦ µéÁö ÊÂÙ.

top

ExpiresByType ÁöÃî z6q2a

í: MIME typeÀÎ Expires ÇìõƨÀ» ÁÇÑÙ
ý: ExpiresByType MIME-type <code>seconds
»çëÀåÒ: ÁÖöÁ, Ƣ»óÈ£, directory, .htaccess
Override ÉÇ: Indexes
»óÅÂ: Extension
µâ: mod_expires

ÀÌ ÁöÃî ¯Á ÁùÀÇ (¦ µéî, text/html) ëÇÑ Expires Çìõƨú Cache-Control ÇìõÀÇ max-age ÁöÃîƨÀ» ÁÀÇÇÑÙ. µÎ ÔÕ碥 âãÀ» áÁÇÒҡ âÁ ã õÇÒ ÃÊÜÀ ƨÀ» ÁöÁÇÑÙ. Cache-Control: max-age âã äûÇÑ Ã£À» »© è»êÇÏí, áú ÃÊÜÀסΠǥÃÇÑÙ.

âÁ ãÀ ÄÀÏÀÇ ÃÖÙ öÁã ÈÀ ŬóÀÌƢ Á¢ÙÇÑ Ã£ÀÌÙ. ÀÌҩ ÍÀ» »çëÇÒÁö <code> ÇʵåÎ áÁÇ ÇÑÙ. MÀ âÁ ãÀÎ ÄÀÏÀÇ ÃÖÙ öÁãÀ» »çëÇÏí, A ŬóÀÌÀÇ Á¢Ù ãÀ» »çëÇÑÙ.

ÂÀÌ ̦ÇÏÙ. MÀ» »çëÇÏé Ĭ ÀÖ µç »ç»ÀÌ ơÀ ã áµÈÙ. Ç»ó ơÀ URLΠã ö ÀÖ ÁÖ£ÀÏÁ ơÀ ëµµ ÁÁÙ. A¦ »çëÇÏé »ç»ÀÇ âãÀÌ ¢¢ Ù£Ù. ÀÌ ÀÚÁÖ öÁµÇÁöÊ ÄÀÏ, ¯È ©¯ ơÀ À» ÂüÁÇÒҡ (¦ µéî, ÀÌÌÁö »óëÀûÀÎ ÂÀ â£µÈ ÝÇ Á¢ÙµÈÙ), À¯ëÇÏÙ.

Á¦: 403k11

# âÇìõ¦ »çëÇÑÙ
ExpiresActive On
# ŬóÀÌ Ä¬ÀÇ GIF À ÇÑ ÈÄ âÇÑÙ
ExpiresByType image/gif A2592000
# HTML  ¯ƩÈÄ ÀÏÁÖÀÏ£ À¯ÈÇÏÙ ExpiresByType text/html M604800

ÀÌ ÁöÃî ExpiresActive OnÀ» »çëÇÒҡע À¯ÈÇÔÀ» ÁÖÀÇÇÏó. ExpiresDefault ÁöÃî¦ »çëÇÏ© ¯Á MIME type ëÇ âãÀ» ÁÇÒ ö ÀÖÙ.

Õ íÇÑ Ù¥ ýÀ» »çëÇÏ© âãÀ» è»êÇÒ öµµ ÀÖÙ.

top

ExpiresDefault ÁöÃî 4om11

í: âãÀ» è»êÇÏ ⻠ËíÁò
ý: ExpiresDefault <code>seconds
»çëÀåÒ: ÁÖöÁ, Ƣ»óÈ£, directory, .htaccess
Override ÉÇ: Indexes
»óÅÂ: Extension
µâ: mod_expires

ÀÌ ÁöÃî Çç µ ÀÖ µç ÀÇ âãÀ» è»êÇÏ ⻠ËíÁòÀ» ÁöÁÇÑÙ. Ù¥ ýÀ» ÂüíÇÏó.

ƢÉÇÑ î:  ko 

top

Comments 2p1l6j

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our s if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our mailing lists.