Apache HTTP Server Version 2.2
This document refers to the 2.2 version of Apache httpd, which is no longer maintained. The active release is documented here. If you have not already upgraded, please follow this link for more information.
You may follow this link to go to the current version of this document.
ÀÌ ¹®¼´Â ¾ÆÆÄÄ¡¿¡¼ Çڵ鷯¸¦ »ç¿ëÇÏ´Â ¹æ¹ýÀ» ¼³¸íÇÑ´Ù.
°ü·ÃµÈ ¸ðµâ | °ü·ÃµÈ Áö½Ã¾î |
---|---|
ÆÄÀÏÀ» ¿äûÇÒ¶§ ¾ÆÆÄÄ¡°¡ ³»ºÎÀûÀ¸·Î ¼öÇàÇÒ ÀÛ¾÷À» "Çڵ鷯(handler)"¶ó°í ÇÑ´Ù. ÀϹÝÀûÀ¸·Î ÆÄÀÏÀº ÆÄÀÏ Á¾·ù¿¡ µû¶ó ¾Ï¹¬ÀûÀÎ Çڵ鷯¸¦ °¡Áö°í ÀÖ´Ù. ¸ðµç ÆÄÀÏÀº º¸Åë °£´ÜÈ÷ ¼¹ö°¡ ¼ºñ½ºÇÏÁö¸¸, ¾î¶² ÆÄÀÏ Á¾·ù´Â µû·Î "󸮵ȴÙ(handled)".
Apache 1.1ºÎÅÍ Çڵ鷯¸¦ ¸í½ÃÀûÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ°Ô µÇ¾ú´Ù. ÆÄÀÏ Á¾·ù¿Í °ü°è¾øÀÌ Çڵ鷯¸¦ ÆÄÀÏÀÇ È®ÀåÀÚ³ª À§Ä¡¿¡ µû¶ó ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù. ÀÌ´Â ´õ ÈǸ¢ÇÑ ¹æ¹ýÀÌ°í ÆÄÀÏÀ» Á¾·ù¿Í Çڵ鷯 µÑ ¸ðµÎ¿Í ¿¬°èÇÒ ¼ö Àֱ⶧¹®¿¡ ÁÁ´Ù. (¿©·¯ È®ÀåÀÚ¸¦ °¡Áø ÆÄÀϵµ Âü°í)
Çڵ鷯´Â ¼¹ö³ª ¸ðµâ·Î ±¸ÇöÇÏ¿©, Action
Áö½Ã¾î·Î Ãß°¡ÇÒ
¼ö ÀÖ´Ù. Ç¥ÁØ ¹èÆ÷º»¿¡ ÀÖ´Â ±âº» Çڵ鷯´Â ´ÙÀ½°ú °°´Ù:
default_handler()
¸¦ »ç¿ëÇÏ¿© ÆÄÀÏÀ» º¸³½´Ù.
(core)mod_asis
)mod_cgi
)mod_imagemap
)mod_info
)mod_status
)mod_negotiation
)´ÙÀ½ Áö½Ã¾î´Â È®ÀåÀÚ°¡ html
ÀÎ ÆÄÀÏÀ»
¿äûÇÒ °æ¿ì footer.pl
CGI ½ºÅ©¸³Æ®¸¦ ¶ç¿î´Ù.
Action add-footer /cgi-bin/footer.pl
AddHandler add-footer .html
CGI ½ºÅ©¸³Æ®´Â
(PATH_TRANSLATED
ȯ°æº¯¼ö°¡ ÁöĪÇÏ´Â) ¿ø·¡
¿äûÇÑ ¹®¼¸¦ ÀûÀýÈ÷ ¼öÁ¤ÇÑ ÈÄ º¸³½´Ù.
´ÙÀ½ Áö½Ã¾î´Â HTTP Çì´õ¸¦ Æ÷ÇÔÇÏ´Â ÆÄÀÏ¿¡
send-as-is
Çڵ鷯¸¦ Áö½ÃÇÑ´Ù.
/web/htdocs/asis/
µð·ºÅ丮 ¾È¿¡ ÀÖ´Â ¸ðµç
ÆÄÀÏÀº È®ÀåÀÚ¿Í °ü°è¾øÀÌ send-as-is
Çڵ鷯°¡
ó¸®ÇÑ´Ù.
<Directory /web/htdocs/asis>
SetHandler send-as-is
</Directory>
Çڵ鷯 ±â´ÉÀ» ±¸ÇöÇϱâÀ§ÇØ »ç¿ëÇÔÁ÷ÇÑ
Apache API°¡ Ãß°¡µÇ¾ú´Ù.
ƯÈ÷ request_rec
±¸Á¶Ã¼¿¡ »õ·Î¿î Çʵ尡
Ãß°¡µÇ¾ú´Ù:
char *handler
¸ðµâÀÌ Çڵ鷯¸¦ »ç¿ëÇÏ·Á¸é, ¿äûÀÇ
invoke_handler
´Ü°è ÀÌÀü¿¡
r->handler
¿¡ Çڵ鷯 À̸§À» ÁöÁ¤ÇØÁֱ⸸
ÇÏ¸é µÈ´Ù. Çڵ鷯´Â content type ´ë½Å Çڵ鷯 À̸§À» »ç¿ëÇÑ
°ÍÀ» Á¦¿ÜÇÏ°í´Â Àü°ú °°ÀÌ ±¸ÇöµÇ¾ú´Ù. ²À Áöų ÇÊ¿ä´Â ¾øÁö¸¸
Çڵ鷯 À̸§¿¡ ½½·¡½¬¸¦ »ç¿ëÇÏÁö ¾Ê°í, ´Ü¾îµé »çÀÌ¿¡ »©±â
±âÈ£¸¦ »ç¿ëÇÏ´Â °ÍÀÌ ÀϹÝÀûÀÌ´Ù. ±×·¡¼ Çڵ鷯 À̸§ÀÌ
media type°ú °ãÄ¡Áö ¾Ê´Â´Ù.