mod_actions ÀÌ ¸ðµâÀº ¹Ìµð¾îÁ¾·ù³ª ¿äû¸Þ¼­µå¿¡ µû¶ó CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÑ´Ù. Base mod_actions.c actions_module

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

mod_cgi CGI·Î µ¿Àû ÆäÀÌÁö »ý¼º ¾ÆÆÄÄ¡¿¡¼­ Çڵ鷯 »ç¿ë Action ƯÁ¤ Çڵ鷯³ª content-type¿¡ ´ëÇØ CGI ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÑ´Ù Action action-type cgi-script [virtual] server configvirtual host directory.htaccess FileInfo 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>
AddHandler
Script ƯÁ¤ ¿äû¸Þ¼­µå¿¡ ´ëÇØ CGI ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÑ´Ù. Script method cgi-script server configvirtual host directory

ÀÌ Áö½Ã¾î´Â ÆÄÀÏÀ» 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