<-
Apache > HTTP Server > Documentation > Version 2.2 > ¸ðµâ

¾ÆÆÄÄ¡ ¸ðµâ mod_actions

°¡´ÉÇÑ ¾ð¾î:  de  |  en  |  ja  |  ko 

ÀÌ ¹®¼­´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù. ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼­¸¦ Âü°íÇϼ¼¿ä.
¼³¸í:ÀÌ ¸ðµâÀº ¹Ìµð¾îÁ¾·ù³ª ¿äû¸Þ¼­µå¿¡ µû¶ó CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù.
»óÅÂ:Base
¸ðµâ¸í:actions_module
¼Ò½ºÆÄÀÏ:mod_actions.c

¿ä¾à

ÀÌ ¸ðµâ¿¡´Â µÎ°¡Áö Áö½Ã¾î°¡ ÀÖ´Ù. Action Áö½Ã¾î´Â ¿äûÇÏ´Â ÆÄÀÏÀÇ MIME content type¿¡ µû¶ó CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù. Script Áö½Ã¾î´Â ¿äûÀÌ Æ¯Á¤ ¸Þ¼­µå¸¦ »ç¿ëÇÒ °æ¿ì CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù. ±×·¡¼­ ÆÄÀÏÀ» ó¸®ÇÏ´Â ½ºÅ©¸³Æ®¸¦ ¸Å¿ì ½±°Ô ½ÇÇàÇÒ ¼ö ÀÖ´Ù.

Áö½Ã¾îµé

Âü°í

top

Action Áö½Ã¾î

¼³¸í:ƯÁ¤ Çڵ鷯³ª 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>

Âü°í

top

Script Áö½Ã¾î

¼³¸í:ƯÁ¤ ¿äû¸Þ¼­µå¿¡ ´ëÇØ 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

°¡´ÉÇÑ ¾ð¾î:  de  |  en  |  ja  |  ko