| <?xml version="1.0" encoding="EUC-KR" ?> |
| <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd"> |
| <?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?> |
| <!-- English Revision: 105989:1728020 (outdated) --> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <modulesynopsis metafile="mod_cgi.xml.meta"> |
| |
| <name>mod_cgi</name> |
| <description>CGI ½ºÅ©¸³Æ® ½ÇÇà</description> |
| <status>Base</status> |
| <sourcefile>mod_cgi.c</sourcefile> |
| <identifier>cgi_module</identifier> |
| |
| <summary> |
| <!-- XXX: Should mention Options ExecCGI |
| is the link to howto/cgi not sufficient? -nd |
| --> |
| |
| <p>¼¹ö´Â mime typeÀÌ <code>application/x-httpd-cgi</code>À̰ųª |
| (¾ÆÆÄÄ¡ 1.1 ÀÌÈÄ) Çڵ鷯°¡ <code>cgi-script</code>ÀÎ ¸ðµç |
| ÆÄÀÏÀ» CGI ½ºÅ©¸³Æ®·Î ÀνÄÇÏ¿©, ½ÇÇàÇÏ°í, ±× °á°ú¸¦ Ŭ¶óÀ̾ðÆ®¿¡°Ô |
| º¸³½´Ù. ÆÄÀÏÀÌ <directive module="mod_mime">AddType</directive> |
| Áö½Ã¾î·Î ÁöÁ¤ÇÑ È®ÀåÀÚ¸¦ °¡Áö°Å³ª, <directive |
| module="mod_alias">ScriptAlias</directive> µð·ºÅ丮 ¾È¿¡ |
| ÀÖÀ¸¸é CGI·Î 󸮵ȴÙ.</p> |
| |
| <p>¼¹ö´Â CGI ½ºÅ©¸³Æ®¸¦ ºÎ¸¦¶§ <code>DOCUMENT_ROOT</code>¶ó´Â |
| ȯ°æº¯¼ö¸¦ Ãß°¡ÇÑ´Ù. ÀÌ º¯¼ö´Â <directive |
| module="core">DocumentRoot</directive> ¼³Á¤°ªÀ» °¡Áø´Ù.</p> |
| |
| <p>¾ÆÆÄÄ¡¿¡¼ CGI ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÏ´Â ¹æ¹ý¿¡ ´ëÇÑ ¼Ò°³´Â |
| <a href="../howto/cgi.html">CGI·Î µ¿Àû ÆäÀÌÁö »ý¼º</a> ÅõÅ丮¾óÀ» |
| Âü°íÇ϶ó.</p> |
| |
| <p>À¯´Ð½º¿¡¼ ´ÙÁß¾²·¹µå MPMÀ» »ç¿ëÇÑ´Ù¸é ÀÌ ¸ðµâ´ë½Å |
| <module>mod_cgid</module> ¸ðµâÀ» »ç¿ëÇØ¾ß ÇÑ´Ù. »ç¿ëÀÚ |
| ÀÔÀå¿¡¼ ÀÌ µÎ ¸ðµâÀº ±âº»ÀûÀ¸·Î µ¿ÀÏÇÏ´Ù.</p> |
| </summary> |
| |
| <seealso><directive module="core">AcceptPathInfo</directive></seealso> |
| <seealso><directive module="core">Options</directive></seealso> |
| <seealso><directive module="mod_alias">ScriptAlias</directive></seealso> |
| <seealso><directive module="mod_mime">AddHandler</directive></seealso> |
| <seealso><a href="../suexec.html">´Ù¸¥ »ç¿ëÀÚ ID·Î CGI ÇÁ·Î±×·¥ |
| ½ÇÇàÇϱâ</a></seealso> |
| <seealso><a href="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI Ç¥ÁØ</a></seealso> |
| |
| <section id="env"><title>CGI ȯ°æº¯¼ö</title> |
| <p>¼¹ö´Â ´ÙÀ½°ú °°Àº ¹æ¹ýÀ¸·Î <a |
| href="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI Ç¥ÁØ</a>ÀÌ ¼³¸íÇÏ´Â |
| CGI ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÑ´Ù:</p> |
| |
| <dl> |
| <dt>PATH_INFO</dt> |
| |
| <dd>ÀÌ º¯¼ö´Â <directive module="core" |
| >AcceptPathInfo</directive> Áö½Ã¾î¸¦ Á÷Á¢ <code>off</code>·Î |
| ÁöÁ¤ÇÑ °æ¿ì¿¡¸¸ ¼³Á¤ÇÑ´Ù. <directive |
| >AcceptPathInfo</directive>°¡ ¾ø´Â °æ¿ì ¼¹ö´Â ±âº»ÀûÀ¸·Î |
| °æ·Î Á¤º¸°¡ ÀÖ´Â ¿äû¿¡ ´ëÇØ 404 NOT FOUND ¿À·ù¸¦ ³»Áö¸¸, |
| <module>mod_cgi</module>´Â °æ·Î Á¤º¸¸¦ (URI¿¡¼ ½ºÅ©¸³Æ® |
| ÆÄÀÏ¸í µÚ¿¡ ³ª¿À´Â <code>/more/path/info</code>) ¹Þ´Â´Ù. |
| <directive>AcceptPathInfo</directive> Áö½Ã¾î¸¦ »ý·«Çϸé |
| <module>mod_cgi</module> ¿äû¿¡ ´ëÇؼ <directive |
| module="core">AcceptPathInfo</directive>¸¦ <code>On</code>À¸·Î |
| ¼³Á¤ÇÑ °Í°ú °°´Ù.</dd> |
| |
| <dt>REMOTE_HOST</dt> |
| |
| <dd>ÀÌ º¯¼ö´Â <directive module="core" |
| >HostnameLookups</directive>°¡ <code>on</code>ÀÌ°í (±âº»°ªÀº |
| off), Á¢¼ÓÇÑ È£½ºÆ® ÁÖ¼Ò¸¦ ¿ªDNS °Ë»öÇÏ¿© ½ÇÁ¦ È£½ºÆ®¸íÀ» |
| ãÀº °æ¿ì¿¡¸¸ ¼³Á¤ÇÑ´Ù.</dd> |
| |
| <dt>REMOTE_IDENT</dt> |
| |
| <dd>ÀÌ º¯¼ö´Â <directive module="core" |
| >IdentityCheck</directive>°¡ <code>on</code>ÀÌ°í, Á¢¼ÓÇÑ |
| È£½ºÆ®°¡ ident ÇÁ·ÎÅäÄÝÀ» Áö¿øÇÏ´Â °æ¿ì¿¡¸¸ ¼³Á¤ÇÑ´Ù. |
| ½±°Ô ÀÌ °ªÀ» ¼ÓÀÏ ¼ö Àֱ⶧¹®¿¡ ÀÌ º¯¼öÀÇ ³»¿ëÀ» ¹ÏÀ¸¸é |
| ¾ÈµÇ°í, Ŭ¶óÀ̾ðÆ®¿Í ¼¹ö »çÀÌ¿¡ ÇÁ·Ï½Ã°¡ ÀÖ´Ù¸é º¯¼ö |
| ³»¿ëÀÌ ¿ÏÀüÈ÷ ¹«ÀǹÌÇÔÀ» ÁÖÀÇÇ϶ó.</dd> |
| |
| <dt>REMOTE_USER</dt> |
| |
| <dd>CGI ½ºÅ©¸³Æ®°¡ ÀÎÁõÀ» °ÅÃľßÇÏ´Â °æ¿ì¿¡¸¸ ¼³Á¤ÇÑ´Ù.</dd> |
| </dl> |
| </section> |
| |
| <section id="cgi-debug"><title>CGI µð¹ö±ë</title> |
| <p>¾îµð¿¡¼ À߸ø ½ÇÇàµÇ´ÂÁö ½ºÅ©¸³Æ®ÀÇ Ãâ·ÂÀ» (Ç¥ÁØÃâ·Â°ú |
| Ç¥ÁØ¿À·ù) º¼ ¼ö ¾ø±â¶§¹®¿¡ CGI ½ºÅ©¸³Æ®´Â ÀüÅëÀûÀ¸·Î µð¹ö±ëÇϱâ |
| ¾î·Á¿ü´Ù. ¾ÆÆÄÄ¡ 1.2 ÀÌÈÄ¿¡ Ãß°¡µÈ Áö½Ã¾î¸¦ »ç¿ëÇÏ¸é ¹ß»ýÇÑ |
| ¿À·ù¸¦ ÀÚ¼¼È÷ ·Î±×¿¡ ³²±æ ¼ö ÀÖ´Ù.</p> |
| |
| <section><title>CGI ·Î±×ÆÄÀÏ Çü½Ä</title> |
| <p>CGI ¿À·ù·Î±×´Â Á¤»óÀûÀ¸·Î ½ÇÇàÇÏÁö ¸øÇÑ CGI¸¦ ±â·ÏÇÑ´Ù. |
| ¿À·ù°¡ ¹ß»ýÇÑ CGI ½ºÅ©¸³Æ®´Â ·Î±×¿¡ ¿©·¯ ÁÙÀÇ Á¤º¸¸¦ ³²±ä´Ù. |
| ù¹ø° µÎ ÁÙÀº Ç×»ó ¾Æ·¡¿Í °°Àº Çü½ÄÀÌ´Ù:</p> |
| |
| <example> |
| %% [<var>½Ã°£</var>] <var>¿äûÁÙ</var><br /> |
| %% <var>HTTP-»óÅÂ</var> <var>CGI-½ºÅ©¸³Æ®-ÆÄÀϸí</var> |
| </example> |
| |
| <p>CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÒ ¼ö ¾ø´Â ¿À·ùÀÎ °æ¿ì ·Î±×ÆÄÀÏ¿¡ |
| Ãß°¡·Î µÎ ÁÙÀ» ´õ ±â·ÏÇÑ´Ù:</p> |
| |
| <example> |
| %%error<br /> |
| <var>¿À·ù¹®</var> |
| </example> |
| |
| <p>½ºÅ©¸³Æ®°¡ (º¸Åë ½ºÅ©¸³Æ®ÀÇ ¹ö±×¶§¹®¿¡) À߸øµÈ Çì´õ |
| Á¤º¸¸¦ ¹ÝȯÇÏ´Â °æ¿ì, ´ÙÀ½ ³»¿ëÀ» ·Î±×¿¡ ±â·ÏÇÑ´Ù:</p> |
| |
| <example> |
| %request<br /> |
| <var>¹ÞÀº ¸ðµç HTTP Çì´õ</var><br /> |
| <var>(ÀÖ´Ù¸é) POST³ª PUT ³»¿ë</var><br /> |
| %response<br /> |
| <var>CGI ½ºÅ©¸³Æ® Ãâ·ÂÀÇ ¸ðµç Çì´õ</var><br /> |
| %stdout<br /> |
| <var>CGI Ç¥ÁØÃâ·Â</var><br /> |
| %stderr<br /> |
| <var>CGI Ç¥ÁØ¿À·ù</var><br /> |
| </example> |
| |
| <p>(½ºÅ©¸³Æ®°¡ Ç¥ÁØÃâ·ÂÀ̳ª Ç¥ÁØ¿À·ù¿¡ ¾Æ¹« ³»¿ëµµ Ãâ·ÂÇÏÁö |
| ¾Ê¾Ò´Ù¸é %stdout°ú %stderr ºÎºÐÀº »ý·«µÉ ¼ö ÀÖ´Ù).</p> |
| </section> |
| </section> |
| |
| <directivesynopsis> |
| <name>ScriptLog</name> |
| <description>CGI ½ºÅ©¸³Æ® ¿À·ù·Î±×ÆÄÀÏÀÇ À§Ä¡</description> |
| <syntax>ScriptLog <var>file-path</var></syntax> |
| <contextlist><context>server config</context> |
| <context>virtual host</context></contextlist> |
| <modulelist><module>mod_cgi</module><module>mod_cgid</module> |
| </modulelist> |
| |
| <usage> |
| <p><directive>ScriptLog</directive> Áö½Ã¾î´Â CGI ½ºÅ©¸³Æ® |
| ¿À·ù·Î±×ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù. <directive>ScriptLog</directive>¸¦ |
| »ç¿ëÇÏÁö¾ÊÀ¸¸é ¿À·ù·Î±×¸¦ ¸¸µéÁö ¾Ê´Â´Ù. »ç¿ëÇÏ¸é ¾Æ±Ô¸ÕÆ®·Î |
| ÁöÁ¤ÇÑ ÆÄÀÏ¿¡ CGI ¿À·ù¸¦ ±â·ÏÇÑ´Ù. »ó´ë°æ·Î¸¦ ÁöÁ¤Çϸé |
| <directive module="core">ServerRoot</directive>¿¡ »ó´ë°æ·Î·Î |
| ¹Þ¾ÆµéÀδÙ. |
| </p> |
| |
| <example><title>¿¹Á¦</title> |
| ScriptLog logs/cgi_log |
| </example> |
| |
| <p>ÀÚ½Ä ÇÁ·Î¼¼½º¸¦ ½ÇÇàÇÏ´Â »ç¿ëÀÚ, <em>Áï</em> <directive |
| module="mpm_common">User</directive> Áö½Ã¾î·Î ÁöÁ¤ÇÑ »ç¿ëÀÚ |
| ±ÇÇÑÀ¸·Î ·Î±×¸¦ ¿¬´Ù. ±×·¡¼ ±× »ç¿ëÀÚ°¡ ½ºÅ©¸³Æ® ·Î±×°¡ |
| ÀÖ´Â µð·ºÅ丮¿¡ ¾²±â±ÇÇÑÀÌ ÀÖ´øÁö, Á÷Á¢ ¹Ì¸® ÆÄÀÏÀ» ¸¸µé¾î¼ |
| ±× »ç¿ëÀÚ¿¡°Ô ¾²±â±ÇÇÑÀ» Áà¾ß ÇÑ´Ù. ½ºÅ©¸³Æ® ·Î±×¸¦ ÁÖ ·Î±× |
| µð·ºÅ丮¿¡ µÐ´Ù¸é ÀÚ½Ä ÇÁ·Î¼¼½º¸¦ ½ÇÇàÇÏ´Â »ç¿ëÀÚ¿¡°Ô ¾²±â±ÇÇÑÀ» |
| ÁÖ±âÀ§ÇØ µð·ºÅ丮 ±ÇÇÑÀ» º¯°æÇÏÁö <strong>¸¶¶ó</strong>.</p> |
| |
| <p>½ºÅ©¸³Æ® ·Î±×´Â CGI ½ºÅ©¸³Æ®¸¦ ÀÛ¼ºÇÒ¶§ µð¹ö±ëÀ» À§ÇÑ |
| ¿ëµµÀÌÁö ¼¹ö¸¦ ½ÇÇàÇÏ´Â µ¿¾È °è¼Ó »ç¿ëÇϱâÀ§ÇÔÀÌ ¾Æ´ÔÀ» |
| ÁÖÀÇÇ϶ó. ¼Óµµ¿Í È¿À²¼º¸é¿¡¼ ÃÖÀûÈ°¡ ¾ÈµÇÀÖ°í, ¼³°èÇÑ |
| ¸ñÀûÀÌ¿ÜÀÇ ¹æ¹ýÀ¸·Î »ç¿ëÇÏ¸é º¸¾È»ó ¹®Á¦°¡ µÉ ¼ö ÀÖ´Ù.</p> |
| </usage> |
| </directivesynopsis> |
| |
| <directivesynopsis> |
| <name>ScriptLogLength</name> |
| <description>CGI ½ºÅ©¸³Æ® ·Î±×ÆÄÀÏÀÇ Å©±â Á¦ÇÑ</description> |
| <syntax>ScriptLogLength <var>bytes</var></syntax> |
| <default>ScriptLogLength 10385760</default> |
| <contextlist><context>server config</context> |
| <context>virtual host</context></contextlist> |
| <modulelist><module>mod_cgi</module><module>mod_cgid</module> |
| </modulelist> |
| |
| <usage> |
| <p><directive>ScriptLogLength</directive>´Â CGI ½ºÅ©¸³Æ® |
| ·Î±×ÆÄÀÏÀÇ Å©±â¸¦ Á¦ÇÑÇÑ´Ù. CGI ¿À·ù°¡ ¹ß»ýÇÒ¶§¸¶´Ù (¸ðµç |
| ¿äû Çì´õ, ¸ðµç ½ºÅ©¸³Æ® Ãâ·Â µî) ¸¹Àº Á¤º¸°¡ ·Î±×¿¡ |
| ±â·ÏµÇ±â¶§¹®¿¡ ÆÄÀÏÀÌ ¸Å¿ì Ä¿Áú ¼ö ÀÖ´Ù. ÆÄÀÏÀÌ ¹«ÇÑÈ÷ Ä¿Áö´Â |
| ¹®Á¦¸¦ ¸·±âÀ§ÇØ ÀÌ Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© CGI ·Î±×ÆÄÀÏÀÇ ÃÖ´ë |
| ÆÄÀÏÅ©±â¸¦ ¼³Á¤ÇÑ´Ù. ÆÄÀÏÀÇ Å©±â°¡ ¼³Á¤ÇÑ °ªÀ» ³ÑÀ¸¸é ´õ |
| ÀÌ»ó Á¤º¸¸¦ ±â·ÏÇÏÁö¾Ê´Â´Ù.</p> |
| </usage> |
| </directivesynopsis> |
| |
| <directivesynopsis> |
| <name>ScriptLogBuffer</name> |
| <description>½ºÅ©¸³Æ® ·Î±×¿¡ ±â·ÏÇÒ PUT ȤÀº POST ¿äûÀÇ ÃÖ´ë·®</description> |
| <syntax>ScriptLogBuffer <var>bytes</var></syntax> |
| <default>ScriptLogBuffer 1024</default> |
| <contextlist><context>server config</context> |
| <context>virtual host</context></contextlist> |
| <modulelist><module>mod_cgi</module><module>mod_cgid</module> |
| </modulelist> |
| |
| <usage> |
| <p>Å« ³»¿ëÀ» ¹Þ¾Æ¼ ·Î±×ÆÄÀÏÀÌ ³Ê¹« »¡¸® Ä¿Áö´Â Çö»óÀ» ¸·±âÀ§ÇØ |
| ÆÄÀÏ¿¡ ±â·ÏÇÒ PUT ȤÀº POST ³»¿ëÀÇ Å©±â¸¦ Á¦ÇÑÇÑ´Ù. ±âº»ÀûÀ¸·Î |
| 1024 ¹ÙÀÌÆ®±îÁö ·Î±×¿¡ ±â·ÏÇÏÁö¸¸, ÀÌ Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© |
| ¼öÁ¤ÇÒ ¼ö ÀÖ´Ù.</p> |
| </usage> |
| </directivesynopsis> |
| |
| </modulesynopsis> |