Apache HTTP Server Version 2.1
¼³¸í: | ÀÌ ¸ðµâÀº ¹Ìµð¾îÁ¾·ù³ª ¿äû¸Þ¼µå¿¡ µû¶ó CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù. |
---|---|
»óÅÂ: | Base |
¸ðµâ¸í: | actions_module |
¼Ò½ºÆÄÀÏ: | mod_actions.c |
ÀÌ ¸ðµâ¿¡´Â µÎ°¡Áö Áö½Ã¾î°¡ ÀÖ´Ù. Action
Áö½Ã¾î´Â ¿äûÇÏ´Â
ÆÄÀÏÀÇ MIME content type¿¡ µû¶ó CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù.
Script
Áö½Ã¾î´Â
¿äûÀÌ Æ¯Á¤ ¸Þ¼µå¸¦ »ç¿ëÇÒ °æ¿ì CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù.
±×·¡¼ ÆÄÀÏÀ» ó¸®ÇÏ´Â ½ºÅ©¸³Æ®¸¦ ¸Å¿ì ½±°Ô ½ÇÇàÇÒ ¼ö ÀÖ´Ù.
¼³¸í: | ƯÁ¤ Çڵ鷯³ª content-type¿¡ ´ëÇØ CGI ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÑ´Ù |
---|---|
¹®¹ý: | Action action-type cgi-script [virtual] |
»ç¿ëÀå¼Ò: | ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ®, directory, .htaccess |
Override ¿É¼Ç: | FileInfo |
»óÅÂ: | Base |
¸ðµâ: | mod_actions |
Áö¿ø: | virtual ¼öÁ¤ÀÚ¿Í Çڵ鷯´Â ¾ÆÆÄÄ¡
2.1¶§ Ãß°¡µÇ¾ú´Ù |
ÀÌ Áö½Ã¾î´Â ¿äûÀÌ action-typeÀ̸é
cgi-script¸¦ ½ÇÇàÇÏ´Â ÇൿÀ» ¼¹ö¿¡ Ãß°¡ÇÑ´Ù.
cgi-script´Â ScriptAlias
³ª AddHandler
¸¦ »ç¿ëÇÏ¿© CGI
½ºÅ©¸³Æ®·Î ÁöÁ¤ÇÑ ¸®¼Ò½ºÀÇ URL°æ·ÎÀÌ´Ù.
action-type¿¡´Â Çڵ鷯³ª MIME content typeÀ»
»ç¿ëÇÒ ¼ö ÀÖ´Ù. ÀÌ Áö½Ã¾î´Â PATH_INFO
¿Í
PATH_TRANSLATED
CGI Ç¥ÁØ È¯°æº¯¼ö·Î ¿äûÇÑ
¹®¼ÀÇ URL°ú ÆÄÀÏ°æ·Î¸¦ Àü´ÞÇÑ´Ù. REDIRECT_HANDLER
º¯¼ö·Î ƯÁ¤ ¿äû¿¡ »ç¿ëÇÒ Çڵ鷯¸¦ Àü´ÞÇÑ´Ù.
# ƯÁ¤ MIME content typeÀÇ ÆÄÀÏ ¿äû:
Action image/gif /cgi-bin/images.cgi
# ƯÁ¤ÇÑ È®ÀåÀÚ¸¦ °¡Áø ÆÄÀÏ
AddHandler my-file-type .xyz
Action my-file-type /cgi-bin/program.cgi
ù¹ø° ¿¹¿¡¼ MIME content typeÀÌ image/gif
ÀÎ
ÆÄÀÏÀ» ¿äûÇϸé ÁöÁ¤ÇÑ cgi ½ºÅ©¸³Æ® /cgi-bin/images.cgi
°¡
ó¸®ÇÑ´Ù.
µÎ¹ø° ¿¹¿¡¼ È®ÀåÀÚ°¡ .xyz
ÀÎ ÆÄÀÏÀ» ¿äûÇϸé
ÁöÁ¤ÇÑ cgi ½ºÅ©¸³Æ® /cgi-bin/program.cgi
°¡
ó¸®ÇÑ´Ù.
In the second example, requests for files with a file extension of
.xyz
are handled instead by the specified cgi script
/cgi-bin/program.cgi
.
¼±ÅÃÀûÀÎ virtual
¼öÁ¤ÀÚ´Â ¿äûÇÑ ÆÄÀÏÀÌ
½ÇÁ¦·Î Á¸ÀçÇÏ´ÂÁö °Ë»çÇÏÁö ¾Êµµ·Ï ÇÑ´Ù. ¿¹¸¦ µé¾î, °¡»óÀÇ
À§Ä¡¿¡ Action
Áö½Ã¾î¸¦ »ç¿ëÇÏ·Á´Â
°æ¿ì À¯¿ëÇÏ´Ù.
<Location /news>
SetHandler news-handler
Action news-handler /cgi-bin/news.cgi virtual
</Location>
¼³¸í: | ƯÁ¤ ¿äû¸Þ¼µå¿¡ ´ëÇØ CGI ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÑ´Ù. |
---|---|
¹®¹ý: | Script method cgi-script |
»ç¿ëÀå¼Ò: | ÁÖ¼¹ö¼³Á¤, °¡»óÈ£½ºÆ®, directory |
»óÅÂ: | Base |
¸ðµâ: | mod_actions |
ÀÌ Áö½Ã¾î´Â ÆÄÀÏÀ» method ¸Þ¼µå¸¦ »ç¿ëÇÏ¿©
¿äûÇϸé cgi-script¸¦ ½ÇÇàÇÏ´Â ÇൿÀ» ¼¹ö¿¡
Ãß°¡ÇÑ´Ù. cgi-script´Â ScriptAlias
³ª AddHandler
¸¦ »ç¿ëÇÏ¿© CGI
½ºÅ©¸³Æ®·Î ÁöÁ¤ÇÑ ¸®¼Ò½ºÀÇ URL°æ·ÎÀÌ´Ù. ÀÌ Áö½Ã¾î´Â
PATH_INFO
¿Í PATH_TRANSLATED
CGI
Ç¥ÁØ È¯°æº¯¼ö·Î ¿äûÇÑ ¹®¼ÀÇ URL°ú ÆÄÀÏ°æ·Î¸¦ Àü´ÞÇÑ´Ù.
Script PUT
°ú
Script put
Àº ¿ÏÀüÈ÷ ´Ù¸£´Ù.
Script
¸í·É¾î´Â ±âº»ÀûÀÎ Çൿ¸¸À»
ó¸®ÇÔÀ» ÁÖÀÇÇ϶ó. CGI ½ºÅ©¸³Æ®°¡ ºÒ¸®°Å³ª, ¿äûÇÑ ¸Þ¼µå¸¦
¾Ë¾Æ¼ ó¸®ÇÒ ¼ö ÀÖ´Â ¸®¼Ò½ºÀÇ °æ¿ì ±×´ë·Î ó¸®ÇÑ´Ù.
GET
¸Þ¼µåÀÇ Script
´Â
ÁúÀǾƱԸÕÆ®°¡ ÀÖÀ»¶§¸¸ (¿¹, foo.html?hi) »ç¿ëÇÔÀ»
ÁÖÀÇÇ϶ó. ÁúÀǾƱԸÕÆ®°¡ ¾ø´Ù¸é Á¤»óÀûÀ¸·Î ¿äûÀ» ó¸®ÇÑ´Ù.
# <ISINDEX>½Ä °Ë»öÀ» À§ÇØ
Script GET /cgi-bin/search
# CGI PUT Çڵ鷯
Script PUT /~bob/put.cgi