Apache HTTP Server Version 2.0
This document refers to the 2.0 version of Apache httpd, which is no longer maintained. Upgrade, and refer to the current version of httpd instead, documented at:
You may follow this link to go to the current version of this document.
¼³¸í: | ³»¿ëÀ» Ŭ¶óÀ̾ðÆ®·Î º¸³»±â Àü¿¡ ¾ÐÃàÇÑ´Ù |
---|---|
»óÅÂ: | Extension |
¸ðµâ¸í: | deflate_module |
¼Ò½ºÆÄÀÏ: | mod_deflate.c |
mod_deflate
¸ðµâÀº ¼¹öÀÇ Ãâ·ÂÀ» ³×Æ®¿÷À¸·Î
Ŭ¶óÀ̾ðÆ®¿¡ º¸³»±â Àü¿¡ ¾ÐÃàÇÏ´Â DEFLATE
Ãâ·ÂÇÊÅ͸¦
Á¦°øÇÑ´Ù.
±ÞÇÑ »ç¶÷À» À§ÇÑ °ßº» ¼³Á¤ÀÌ´Ù.
AddOutputFilterByType DEFLATE text/html text/plain text/xml
¾Æ·¡ ¼³Á¤Àº ¿ä¾àÇÏ¿´Áö¸¸ ±×·¡µµ º¹ÀâÇÏ´Ù. ¼³Á¤À» ¿ÏÀüÈ÷ ÀÌÇØÇÑ ÈÄ »ç¿ëÇ϶ó.
<Location />
# ÇÊÅ͸¦ Ãß°¡ÇÑ´Ù
SetOutputFilter DEFLATE
# Netscape 4.x¿¡ ¹®Á¦°¡ ÀÖ´Ù...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08¿¡ ´õ ¹®Á¦°¡ ÀÖ´Ù
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIEÀº Netscape¶ó°í ÀÚ½ÅÀ» ¾Ë¸®Áö¸¸, ¹®Á¦°¡ ¾ø´Ù
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# ÁÖÀÇ: ¾ÆÆÄÄ¡ 2.0.48±îÁö mod_setenvifÀÇ ¹ö±×¶§¹®¿¡
# À§ÀÇ Á¤±ÔÇ¥Çö½ÄÀº µ¿ÀÛÇÏÁö ¾Ê´Â´Ù. ¿øÇÏ´Â È¿°ú¸¦
# ¾ò±âÀ§ÇØ ´ÙÀ½°ú °°ÀÌ ¼öÁ¤ÇÏ¿© »ç¿ëÇÑ´Ù:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# À̹ÌÁö¸¦ ¾ÐÃàÇÏÁö ¾Ê´Â´Ù
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
# ÇÁ·Ï½Ã°¡ À߸øµÈ ³»¿ëÀ» Àü´ÞÇÏÁö¾Êµµ·Ï ÇÑ´Ù
Header append Vary User-Agent env=!dont-vary
</Location>
DEFLATE
ÇÊÅÍ°¡
¾ÐÃàÀ» ÇÑ´Ù. ´ÙÀ½ Áö½Ã¾î´Â Áö½Ã¾î°¡ ÀÖ´Â À§Ä¡ÀÇ ¹®¼¸¦
¾ÐÃàÇÑ´Ù:
SetOutputFilter DEFLATE
¸ðµç ³»¿ëÀ» ¾ÐÃàÇϸé ó¸®ÇÏÁö ¸øÇÏ´Â ºê¶ó¿ìÀú°¡ Àֱ⶧¹®¿¡
html ÆÄÀϸ¸À» ¾ÐÃàÇϱâÀ§ÇØ (¾Æ·¡ Âü°í)
gzip-only-text/html
À» 1
·Î ¼³Á¤ÇÒÁöµµ
¸ð¸¥´Ù. À̸¦ 1
ÀÌ ¾Æ´Ñ °ªÀ¸·Î ¼³Á¤Çϸé
¹«½ÃÇÑ´Ù.
º¸Åë Ưº°ÇÑ MIME type¸¸ ¾ÐÃàÇÏ·Á¸é AddOutputFilterByType
Áö½Ã¾î¸¦ »ç¿ëÇÑ´Ù.
´ÙÀ½ ¼³Á¤Àº html ÆÄÀϸ¸À» ¾ÐÃàÇÑ´Ù:
<Directory "/your-server-root/manual">
AddOutputFilterByType DEFLATE text/html
</Directory>
¾ÐÃàÇÑ ÆÄÀÏÀ» ó¸®ÇÏÁö ¸øÇÏ´Â ºê¶ó¿ìÀú¿¡°Ô´Â ¾ÐÃàÇÏÁö¾Ê°í
º¸³»±æÀ§ÇØ BrowserMatch
Áö½Ã¾î¿¡ no-gzip
À»
¼³Á¤ÇÑ´Ù. ÃÖÀûÀÇ °á°ú¸¦ ¾ò±âÀ§ÇØ no-gzip
°ú
gzip-only-text/html
À» °°ÀÌ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
ÀÌ °æ¿ì ÀüÀÚ°¡ ÈÄÀÚ¸¦ ¹«½ÃÇÑ´Ù. À§ ÀýÀÇ ¼³Á¤ ¿¹Á¦ ÀϺθ¦ »ìÆ캸ÀÚ:
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
¸ÕÀú User-Agent
¹®ÀÚ¿À» º¸°í Netscape
Navigator ¹öÀü 4.xÀÎÁö °Ë»çÇÑ´Ù. ÀÌ ¹öÀüÀº text/html
ÀÌ
¾Æ´Ñ typeÀÇ ¾ÐÃàÀ» ó¸®ÇÏÁö ¸øÇÑ´Ù. ¹öÀü 4.06, 4.07, 4.08Àº
html ÆÄÀÏ ¾ÐÃàÀ» ó¸®Çϴ´뵵 ¹®Á¦°¡ ÀÖ´Ù. ±×·¡¼ ¿ì¸®´Â
ÀÌ °æ¿ì deflate ÇÊÅ͸¦ ¿ÏÀüÈ÷ »ç¿ëÇÏÁö¾Ê´Â´Ù.
¼¼¹ø° BrowserMatch
Áö½Ã¾î´Â Microsoft Internet Explorer°¡ ÀÚ½ÅÀ» "Mozilla/4"·Î
¾Ë¸®Áö¸¸ ¾ÐÃàµÈ ¿äûÀ» ó¸®ÇÒ ¼ö Àֱ⶧¹®¿¡ user agent
ÃßÃøÀ» ¼öÁ¤ÇÑ´Ù. User-Agent
Çì´õ¿¡¼ "MSIE"
(\b
´Â "´Ü¾î °æ°è"¸¦ ¶æÇÑ´Ù) ¹®ÀÚ¿À» ¹ß°ßÇϸé
¾Õ¿¡¼ ¼³Á¤ÇÑ Á¦¾àÀ» Ǭ´Ù.
DEFLATE
ÇÊÅÍ´Â Ç×»ó PHP³ª SSI¿Í °°Àº RESOURCE
ÇÊÅÍ µÚ¿¡ µé¾î°£´Ù. ¶Ç, ³»ºÎ ÇÏÀ§¿äû(subrequest)¿¡ ¿µÇâÀ»
ÁÖÁö ¾Ê´Â´Ù.
mod_deflate
¸ðµâÀº gzipÀ¸·Î ¾ÐÃàµÈ ¿äû
³»¿ëÀ» Ǫ´Â ÇÊÅ͵µ Á¦°øÇÑ´Ù. ÀÌ ±â´ÉÀ» »ç¿ëÇÏ·Á¸é ´ÙÀ½°ú
°°ÀÌ SetInputFilter
³ª
AddInputFilter
¸¦
»ç¿ëÇÏ¿© ÀÔ·ÂÇÊÅͼø¼¿¡ DEFLATE
ÇÊÅ͸¦
Ãß°¡ÇÑ´Ù.
<Location /dav-area>
SetInputFilter DEFLATE
</Location>
¿äû¿¡ Content-Encoding: gzip
Çì´õ°¡ ÀÖ´Ù¸é
ÀÚµ¿À¸·Î ¾ÐÃàµÈ ³»¿ëÀ» Ǭ´Ù. gzip ¿äûÀ» ÇÒ ¼ö ÀÖ´Â
ºê¶ó¿ìÀú´Â µå¹°´Ù. ±×·¯³ª ¾î¶² WebDAV Ŭ¶óÀ̾ðÆ®¿Í °°Àº
Ưº°ÇÑ ÇÁ·Î±×·¥Àº ¿äû ¾ÐÃàÀ» Áö¿øÇÑ´Ù.
¿äû ³»¿ëÀ» Á÷Á¢ »ìÆ캻´Ù¸é, Content-Length
Çì´õ¸¦ ¹ÏÁö¸¶¶ó! Content-Length Çì´õ´Â Ŭ¶óÀ̾ðÆ®°¡
º¸³½ ³»¿ëÀÇ ±æÀÌÀÌÁö, ¾ÐÃàÀ» Ǭ °á°úÀÇ ¹ÙÀÌÆ®¼ö°¡
¾Æ´Ï´Ù.
mod_deflate
¸ðµâÀº ÇÁ·Ï½Ã°¡ ÀÚ½ÅÀÌ Ä³½¬ÇÑ
ÀÀ´äÀ» ÀûÀýÇÑ Accept-Encoding
¿äû Çì´õ¸¦ º¸³½
Ŭ¶óÀ̾ðÆ®¿¡°Ô¸¸ º¸³»µµ·Ï Vary:
Accept-Encoding
HTTP ÀÀ´ä Çì´õ¸¦ Ãß°¡ÇÑ´Ù. ±×·¡¼
¾ÐÃàµÈ ³»¿ëÀ» ÀÌÇØÇÒ ¼ö ¾ø´Â Ŭ¶óÀ̾ðÆ®¿¡ ¾ÐÃàµÈ ³»¿ëÀ»
º¸³»Áö¾Êµµ·Ï ÇÑ´Ù.
¿¹¸¦ µé¾î, User-Agent
Çì´õ µî¿¡ µû¶ó Ưº°È÷
ÇÊÅÍ Àû¿ëÀ» Ãë¼ÒÇÑ´Ù¸é, ÇÁ·Ï½Ã¿¡°Ô ÀÌ·¯ÇÑ Á¦ÇÑÀ» ¾Ë·ÁÁÖ±âÀ§ÇØ
Á÷Á¢ Vary
Çì´õ¿¡ Ãß°¡ÇØ¾ß ÇÑ´Ù. ¿¹¸¦ µé¾î,
¼³Á¤ÀÌ User-Agent
¿¡ µû¶ó DEFLATE
ÇÊÅ͸¦ Ãß°¡ÇÑ´Ù¸é ´ÙÀ½À» »ç¿ëÇÑ´Ù:
Header append Vary User-Agent
¿äû Çì´õ¿ÜÀÇ ´Ù¸¥ Á¤º¸¿¡ (¿¹¸¦ µé¾î, HTTP ¹öÀü)
µû¶ó ¾ÐÃà ¿©ºÎ°¡ °áÁ¤µÈ´Ù¸é, Vary
Çì´õ°ªÀ»
*
·Î ¼³Á¤ÇØ¾ß ÇÑ´Ù. ±×·¯¸é Ç¥ÁØÀ» µû¸£´Â ÇÁ·Ï½Ã´Â
ij½¬¸¦ ÇÏÁö ¾Ê°Ô µÈ´Ù.
Header set Vary *
¼³¸í: | zlibÀÌ Çѹø¿¡ ¾ÐÃàÇÒ Å©±â |
---|---|
¹®¹ý: | DeflateBufferSize value |
±âº»°ª: | DeflateBufferSize 8096 |
»ç¿ëÀå¼Ò: | ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ® |
»óÅÂ: | Extension |
¸ðµâ: | mod_deflate |
DeflateBufferSize
Áö½Ã¾î´Â zlibÀÌ
Çѹø¿¡ ¾ÐÃàÇÒ ¹ÙÀÌÆ®¼ö¸¦ ÁöÁ¤ÇÑ´Ù.
¼³¸í: | Ãâ·ÂÀ» ¾î´ÀÁ¤µµ ¾ÐÃàÇϴ°¡ |
---|---|
¹®¹ý: | DeflateCompressionLevel value |
±âº»°ª: | Zlib's default |
»ç¿ëÀå¼Ò: | ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ® |
»óÅÂ: | Extension |
¸ðµâ: | mod_deflate |
Áö¿ø: | ¾ÆÆÄÄ¡ 2.0.45 ºÎÅÍ |
DeflateCompressionLevel
Áö½Ã¾î´Â
»ç¿ëÇÒ ¾ÐÃà¼öÁØÀ» ¼±ÅÃÇÑ´Ù. °ªÀÌ Å¬¼ö·Ï ¾ÐÃà·üÀÌ Áõ°¡ÇÏÁö¸¸,
CPU¸¦ ´õ ¸¹ÀÌ »ç¿ëÇÑ´Ù.
(°¡Àå ´ú ¾ÐÃà) 1°ú (°¡Àå ¸¹ÀÌ ¾ÐÃà) 9 »çÀÌÀÇ °ªÀ» ÁöÁ¤ÇÑ´Ù.
¼³¸í: | ¾ÐÃà·üÀ» ·Î±×¿¡ ±â·ÏÇÑ´Ù |
---|---|
¹®¹ý: | DeflateFilterNote [type] notename |
»ç¿ëÀå¼Ò: | ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ® |
»óÅÂ: | Extension |
¸ðµâ: | mod_deflate |
Áö¿ø: | typeÀº ¾ÆÆÄÄ¡ 2.0.45 ºÎÅÍ |
DeflateFilterNote
Áö½Ã¾î´Â ¿äûÀÇ
¾ÐÃà·üÀ» ·Î±×¿¡ ±â·ÏÇÏ´Â ±âÈ£¸¦ ÁöÁ¤ÇÑ´Ù. ±âÈ£ À̸§Àº Áö½Ã¾î·Î
ÁöÁ¤ÇÑ °ªÀÌ´Ù. Åë°è¸¦ À§ÇØ Á¢±Ù
·Î±×¿¡¼ ±âÈ£¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
DeflateFilterNote ratio
LogFormat '"%r" %b (%{ratio}n) "%{User-agent}i"' deflate
CustomLog logs/deflate_log deflate
·Î±×¿¡¼ ´õ Á¤È®ÇÑ °ªÀ» ÃßÃâÇÏ·Á¸é type ¾Æ±Ô¸ÕÆ®·Î ±â·ÏÇÒ ÀڷḦ ¼±ÅÃÇÑ´Ù. type´Â ´ÙÀ½Áß ÇϳªÀÌ´Ù:
Input
Output
Ratio
output/input * 100
) ÀúÀåÇÑ´Ù.
type ¾Æ±Ô¸ÕÆ®¸¦ »ý·«ÇÏ¸é »ç¿ëÇÏ´Â ±âº»°ªÀÌ´Ù.±×·¡¼ ÀÌ·¸°Ô ·Î±×¿¡ ±â·ÏÇÒ ¼ö ÀÖ´Ù:
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog logs/deflate_log deflate
¼³¸í: | zlibÀÌ ¾ÐÃàÇÒ¶§ »ç¿ëÇÏ´Â ¸Þ¸ð¸®·® |
---|---|
¹®¹ý: | DeflateMemLevel value |
±âº»°ª: | DeflateMemLevel 9 |
»ç¿ëÀå¼Ò: | ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ® |
»óÅÂ: | Extension |
¸ðµâ: | mod_deflate |
DeflateMemLevel
Áö½Ã¾î´Â zlibÀÌ
¾ÐÃàÇÒ¶§ ¾ó¸¶¸¸Å ¸Þ¸ð¸®¸¦ »ç¿ëÇÒÁö °áÁ¤ÇÑ´Ù. (1°ú 9 »çÀÌÀÇ
°ª)
¼³¸í: | Zlib ¾ÐÃà window size |
---|---|
¹®¹ý: | DeflateWindowSize value |
±âº»°ª: | DeflateWindowSize 15 |
»ç¿ëÀå¼Ò: | ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ® |
»óÅÂ: | Extension |
¸ðµâ: | mod_deflate |
DeflateWindowSize
Áö½Ã¾î´Â zlib
¾ÐÃà window size¸¦ (1°ú 15 »çÀÌÀÇ °ª) ÁöÁ¤ÇÑ´Ù. ÀϹÝÀûÀ¸·Î
window size°¡ Ŭ¼ö·Ï ¾ÐÃà·üÀÌ Áõ°¡ÇÑ´Ù.