summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_cgi.xml.ko
blob: b6c4a0a93aeb630f4fe930046166df142832e1ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<?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:1334011 (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>