¾È³çÇϼ¼¿ä..
cgi·Î sh ÆÄÀÏÀ» ½ÇÇà ½ÃÅ°°íÀÚ ÇÕ´Ï´Ù.
a. cgi ´Â ´ÙÀ½°ú °°½À´Ï´Ù.
#!/bin/sh
system("./test.sh");
...
test.sh ÆÄÀÏÀº ¿À¶óŬÀ» Á¢¼ÓÇÏ¿© ÀÛ¾÷ÇÏ´Â ½ºÅ©¸³Æ®·Î Â¥¿©Á® ÀÖ½À´Ï´Ù.
°¢°¢ÀÇ Æ۹̼ÇÀº 7777·Î ÁÖ¾ú½À´Ï´Ù. (ÇØ´ç µð·ºÅ丮µµ 777·Î ÁÖ¾ú½À´Ï´Ù.)
±×¸®°í À¥ÆäÀÌÁö¿¡¼ a.cgi ¸¦ È£ÃâÇϸé " Internal Server Error "°¡ ¹ß»ýÇÕ´Ï´Ù.
a.cgi³ª test.sh¸¦ ¼¹ö¿¡¼ Á÷Á¢ ½ÇÇàÇϸé ÀÛ¾÷ÀÌ Á¤»óÀûÀ¸·Î ½ÇÇà µË´Ï´Ù.
a.cgi¸¦ ¾Æ·¡¿Í °°ÀÌ º¯°æÇÏ°í,
#!/bin/sh
./test.sh (ȤÀº test.sh)
...
À¥ÆäÀÌÁö¿¡¼ ½ÇÇàÇϸé, ¿¡·¯ ¸Þ¼¼Áö´Â ³ª¿ÀÁö´Â ¾ÊÁö¸¸, ½ºÅ©¸³Æ® ÀÛ¾÷ÀÌ ÀÌ·ç¾îÁöÁö ¾Ê½À´Ï´Ù.
¾ÆÆÄÄ¡ ¼¹öÀÇ httpd.conf ÆÄÀÏÀº ¾Æ·¡¿Í °°ÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù.
ScriptAlias /cgi-bin/ "/home3/test/"
<Directory "/home3/test/">
AllowOverride None
Order allow,deny
Allow from all
Options ExecCGI
</Directory>
¾î¶² ¹®Á¦ÀÎÁö °í¼ö´ÔµéÀÇ Á¶¾ðÀÌ ÇÊ¿äÇÕ´Ï´Ù.
³Ê¹« ¸ô¶ó¼ ´ä´äÇϱº¿ä.. µµ¿Í ÁÖ¼¼¿ä..