1<?xml version="1.0" encoding="EUC-KR"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!-- 4 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 5 This file is generated from xml source: DO NOT EDIT 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 --> 8<title>mod_cgi - Apache HTTP Server</title> 9<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 10<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 11<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" /> 12<script src="/style/scripts/prettify.js" type="text/javascript"> 13</script> 14 15<link href="/images/favicon.ico" rel="shortcut icon" /></head> 16<body> 17<div id="page-header"> 18<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p> 19<p class="apache">Apache HTTP Server Version 2.2</p> 20<img alt="" src="/images/feather.gif" /></div> 21<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div> 22<div id="path"> 23<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">���</a></div> 24<div id="page-content"> 25<div id="preamble"><h1>����ġ ��� mod_cgi</h1> 26<div class="toplang"> 27<p><span>������ ���: </span><a href="/en/mod/mod_cgi.html" hreflang="en" rel="alternate" title="English"> en </a> | 28<a href="/ja/mod/mod_cgi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | 29<a href="/ko/mod/mod_cgi.html" title="Korean"> ko </a></p> 30</div> 31<div class="outofdate">�� ������ �ֽ��� ���� �ƴմϴ�. 32 �ֱٿ� ����� ������ ���� ������ ����ϼ���.</div> 33<table class="module"><tr><th><a href="module-dict.html#Description">����:</a></th><td>CGI ��ũ��Ʈ ����</td></tr> 34<tr><th><a href="module-dict.html#Status">����:</a></th><td>Base</td></tr> 35<tr><th><a href="module-dict.html#ModuleIdentifier">����:</a></th><td>cgi_module</td></tr> 36<tr><th><a href="module-dict.html#SourceFile">�ҽ�����:</a></th><td>mod_cgi.c</td></tr></table> 37<h3>���</h3> 38 39 40 41 <p>������ mime type�� <code>application/x-httpd-cgi</code>�̰ų� 42 (����ġ 1.1 ����) �ڵ鷯�� <code>cgi-script</code>�� ��� 43 ������ CGI ��ũ��Ʈ�� �ν��Ͽ�, �����ϰ�, �� ��� Ŭ���̾�Ʈ���� 44 ������. ������ <code class="directive"><a href="/mod/mod_mime.html#addtype">AddType</a></code> 45 ���þ�� ������ Ȯ���ڸ� �����ų�, <code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code> ���丮 �ȿ� 46 ������ CGI�� ó���ȴ�.</p> 47 48 <p>������ CGI ��ũ��Ʈ�� �θ��� <code>DOCUMENT_ROOT</code>��� 49 ȯ�溯���� �߰��Ѵ�. �� ������ <code class="directive"><a href="/mod/core.html#documentroot">DocumentRoot</a></code> �������� �����.</p> 50 51 <p>����ġ���� CGI ��ũ��Ʈ�� ����ϴ� ��� ���� �Ұ��� 52 <a href="/howto/cgi.html">CGI�� ���� ������ ��</a> ���丮���� 53 ����϶�.</p> 54 55 <p>���н����� ���߾����� MPM�� ����Ѵٸ� �� ����� 56 <code class="module"><a href="/mod/mod_cgid.html">mod_cgid</a></code> ����� ����ؾ� �Ѵ�. ����� 57 ���忡�� �� �� ����� �⺻������ �����ϴ�.</p> 58</div> 59<div id="quickview"><h3 class="directives">���þ��</h3> 60<ul id="toc"> 61<li><img alt="" src="/images/down.gif" /> <a href="#scriptlog">ScriptLog</a></li> 62<li><img alt="" src="/images/down.gif" /> <a href="#scriptlogbuffer">ScriptLogBuffer</a></li> 63<li><img alt="" src="/images/down.gif" /> <a href="#scriptloglength">ScriptLogLength</a></li> 64</ul> 65<h3>����</h3> 66<ul id="topics"> 67<li><img alt="" src="/images/down.gif" /> <a href="#env">CGI ȯ�溯��</a></li> 68<li><img alt="" src="/images/down.gif" /> <a href="#cgi-debug">CGI �����</a></li> 69</ul><h3>���</h3> 70<ul class="seealso"> 71<li><code class="directive"><a href="/mod/core.html#acceptpathinfo">AcceptPathInfo</a></code></li> 72<li><code class="directive"><a href="/mod/core.html#options">Options</a></code></li> 73<li><code class="directive"><a href="/mod/mod_alias.html#scriptalias">ScriptAlias</a></code></li> 74<li><code class="directive"><a href="/mod/mod_mime.html#addhandler">AddHandler</a></code></li> 75<li><a href="/suexec.html">�ٸ� ����� ID�� CGI ���α� 76�����ϱ�</a></li> 77<li><a href="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI ǥ��</a></li> 78</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> 79<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 80<div class="section"> 81<h2><a name="env" id="env">CGI ȯ�溯��</a></h2> 82 <p>������ ������ ���� ������� <a href="http://hoohoo.ncsa.uiuc.edu/cgi/">CGI ǥ��</a>�� �����ϴ� 83 CGI ȯ�溯���� �����Ѵ�:</p> 84 85 <dl> 86 <dt>PATH_INFO</dt> 87 88 <dd>�� ������ <code class="directive"><a href="/mod/core.html#acceptpathinfo">AcceptPathInfo</a></code> ���þ ���� <code>off</code>�� 89 ������ ��쿡�� �����Ѵ�. <code class="directive">AcceptPathInfo</code>�� ��� ��� ������ �⺻������ 90 ��� ������ �ִ� ��û�� ���� 404 NOT FOUND ���� ������, 91 <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>�� ��� ������ (URI���� ��ũ��Ʈ 92 ���ϸ� �ڿ� ������ <code>/more/path/info</code>) �´�. 93 <code class="directive">AcceptPathInfo</code> ���þ ���ϸ� 94 <code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code> ��û�� ���ؼ� <code class="directive"><a href="/mod/core.html#acceptpathinfo">AcceptPathInfo</a></code>�� <code>On</code>���� 95 ������ �Ͱ� ����.</dd> 96 97 <dt>REMOTE_HOST</dt> 98 99 <dd>�� ������ <code class="directive"><a href="/mod/core.html#hostnamelookups">HostnameLookups</a></code>�� <code>on</code>�̰� (�⺻���� 100 off), ������ ȣ��Ʈ �ּҸ� ��DNS �˻��Ͽ� ���� ȣ��Ʈ���� 101 ã�� ��쿡�� �����Ѵ�.</dd> 102 103 <dt>REMOTE_IDENT</dt> 104 105 <dd>�� ������ <code class="directive"><a href="/mod/core.html#identitycheck">IdentityCheck</a></code>�� <code>on</code>�̰�, ������ 106 ȣ��Ʈ�� ident ���������� �����ϴ� ��쿡�� �����Ѵ�. 107 ���� �� ���� ���� �� �ֱ���� �� ������ ������ ������ 108 �ȵǰ�, Ŭ���̾�Ʈ�� ���� ���̿� ���Ͻð� �ִٸ� ���� 109 ������ ������ ���ǹ����� �����϶�.</dd> 110 111 <dt>REMOTE_USER</dt> 112 113 <dd>CGI ��ũ��Ʈ�� ������ ���ľ��ϴ� ��쿡�� �����Ѵ�.</dd> 114 </dl> 115</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 116<div class="section"> 117<h2><a name="cgi-debug" id="cgi-debug">CGI �����</a></h2> 118 <p>��� �߸� ����Ǵ��� ��ũ��Ʈ�� ����� (ǥ����°� 119 ǥ�ؿ���) �� �� ������ CGI ��ũ��Ʈ�� ���������� ������ϱ� 120 ������. ����ġ 1.2 ���Ŀ� �߰��� ���þ ����ϸ� ���� 121 ���� �ڼ��� �α� ���� �� �ִ�.</p> 122 123 <h3>CGI �α����� ���</h3> 124 <p>CGI ����α״� ���������� �������� ���� CGI�� ����Ѵ�. 125 ���� ���� CGI ��ũ��Ʈ�� �α� ���� ���� ������ �����. 126 ù��° �� ���� �� �Ʒ��� ���� ����̴�:</p> 127 128 <div class="example"><p><code> 129 %% [<var>�ð�</var>] <var>��û��</var><br /> 130 %% <var>HTTP-����</var> <var>CGI-��ũ��Ʈ-���ϸ�</var> 131 </code></p></div> 132 133 <p>CGI ��ũ��Ʈ�� ������ �� ��� ������ ��� �α����Ͽ� 134 �߰��� �� ���� �� ����Ѵ�:</p> 135 136 <div class="example"><p><code> 137 %%error<br /> 138 <var>����</var> 139 </code></p></div> 140 141 <p>��ũ��Ʈ�� (���� ��ũ��Ʈ�� ��������) �߸�� ��� 142 ������ ��ȯ�ϴ� ���, ���� ������ �α� ����Ѵ�:</p> 143 144 <div class="example"><p><code> 145 %request<br /> 146 <var>���� ��� HTTP ���</var><br /> 147 <var>(�ִٸ�) POST�� PUT ����</var><br /> 148 %response<br /> 149 <var>CGI ��ũ��Ʈ ����� ��� ���</var><br /> 150 %stdout<br /> 151 <var>CGI ǥ�����</var><br /> 152 %stderr<br /> 153 <var>CGI ǥ�ؿ���</var><br /> 154 </code></p></div> 155 156 <p>(��ũ��Ʈ�� ǥ������̳� ǥ�ؿ��� �ƹ� ���뵵 ������� 157 �ʾҴٸ� %stdout�� %stderr �κ��� ��� �� �ִ�).</p> 158 159</div> 160<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 161<div class="directive-section"><h2><a name="ScriptLog" id="ScriptLog">ScriptLog</a> <a name="scriptlog" id="scriptlog">���þ�</a></h2> 162<table class="directive"> 163<tr><th><a href="directive-dict.html#Description">����:</a></th><td>CGI ��ũ��Ʈ ����α������� ��ġ</td></tr> 164<tr><th><a href="directive-dict.html#Syntax">����:</a></th><td><code>ScriptLog <var>file-path</var></code></td></tr> 165<tr><th><a href="directive-dict.html#Context">������:</a></th><td>�ּ�������, ����ȣ��Ʈ</td></tr> 166<tr><th><a href="directive-dict.html#Status">����:</a></th><td>Base</td></tr> 167<tr><th><a href="directive-dict.html#Module">���:</a></th><td><code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, <code class="module"><a href="/mod/mod_cgid.html">mod_cgid</a></code></td></tr> 168</table> 169 <p><code class="directive">ScriptLog</code> ���þ�� CGI ��ũ��Ʈ 170 ����α������� �����Ѵ�. <code class="directive">ScriptLog</code>�� 171 ������������� ����α� ������ �ʴ´�. ����ϸ� �ƱԸ�Ʈ�� 172 ������ ���Ͽ� CGI ���� ����Ѵ�. ����θ� �����ϸ� 173 <code class="directive"><a href="/mod/core.html#serverroot">ServerRoot</a></code>�� ����η� 174 �Ƶ��δ�. 175 </p> 176 177 <div class="example"><h3>����</h3><p><code> 178 ScriptLog logs/cgi_log 179 </code></p></div> 180 181 <p>�ڽ� ���μ����� �����ϴ� �����, <em>��</em> <code class="directive"><a href="/mod/mpm_common.html#user">User</a></code> ���þ�� ������ ����� 182 �������� �α� ����. ���� �� ����ڰ� ��ũ��Ʈ �αװ� 183 �ִ� ���丮�� ��������� �ִ���, ���� �̸� ������ ���� 184 �� ����ڿ��� ��������� ��� �Ѵ�. ��ũ��Ʈ �α� �� �α� 185 ���丮�� �дٸ� �ڽ� ���μ����� �����ϴ� ����ڿ��� ��������� 186 �ֱ����� ���丮 ������ �������� <strong>����</strong>.</p> 187 188 <p>��ũ��Ʈ �α״� CGI ��ũ��Ʈ�� �ۼ��Ҷ� ������� ���� 189 �뵵���� ������ �����ϴ� ���� ��� ����ϱ������� �ƴ��� 190 �����϶�. �ӵ��� ȿ�����鿡�� ����ȭ�� �ȵ��ְ�, ������ 191 �����̿��� ������� ����ϸ� ���Ȼ� ������ �� �� �ִ�.</p> 192 193</div> 194<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 195<div class="directive-section"><h2><a name="ScriptLogBuffer" id="ScriptLogBuffer">ScriptLogBuffer</a> <a name="scriptlogbuffer" id="scriptlogbuffer">���þ�</a></h2> 196<table class="directive"> 197<tr><th><a href="directive-dict.html#Description">����:</a></th><td>��ũ��Ʈ �α� ����� PUT Ȥ�� POST ��û�� �ִ뷮</td></tr> 198<tr><th><a href="directive-dict.html#Syntax">����:</a></th><td><code>ScriptLogBuffer <var>bytes</var></code></td></tr> 199<tr><th><a href="directive-dict.html#Default">�⺻��:</a></th><td><code>ScriptLogBuffer 1024</code></td></tr> 200<tr><th><a href="directive-dict.html#Context">������:</a></th><td>�ּ�������, ����ȣ��Ʈ</td></tr> 201<tr><th><a href="directive-dict.html#Status">����:</a></th><td>Base</td></tr> 202<tr><th><a href="directive-dict.html#Module">���:</a></th><td><code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, <code class="module"><a href="/mod/mod_cgid.html">mod_cgid</a></code></td></tr> 203</table> 204 <p>ū ������ �Ƽ� �α������� �ʹ� ���� Ŀ���� ������ �������� 205 ���Ͽ� ����� PUT Ȥ�� POST ������ ũ�⸦ �����Ѵ�. �⺻������ 206 1024 ����Ʈ���� �α� ���������, �� ���þ ����Ͽ� 207 ������ �� �ִ�.</p> 208 209</div> 210<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 211<div class="directive-section"><h2><a name="ScriptLogLength" id="ScriptLogLength">ScriptLogLength</a> <a name="scriptloglength" id="scriptloglength">���þ�</a></h2> 212<table class="directive"> 213<tr><th><a href="directive-dict.html#Description">����:</a></th><td>CGI ��ũ��Ʈ �α������� ũ�� ����</td></tr> 214<tr><th><a href="directive-dict.html#Syntax">����:</a></th><td><code>ScriptLogLength <var>bytes</var></code></td></tr> 215<tr><th><a href="directive-dict.html#Default">�⺻��:</a></th><td><code>ScriptLogLength 10385760</code></td></tr> 216<tr><th><a href="directive-dict.html#Context">������:</a></th><td>�ּ�������, ����ȣ��Ʈ</td></tr> 217<tr><th><a href="directive-dict.html#Status">����:</a></th><td>Base</td></tr> 218<tr><th><a href="directive-dict.html#Module">���:</a></th><td><code class="module"><a href="/mod/mod_cgi.html">mod_cgi</a></code>, <code class="module"><a href="/mod/mod_cgid.html">mod_cgid</a></code></td></tr> 219</table> 220 <p><code class="directive">ScriptLogLength</code>�� CGI ��ũ��Ʈ 221 �α������� ũ�⸦ �����Ѵ�. CGI ���� ���Ҷ����� (��� 222 ��û ���, ��� ��ũ��Ʈ ��� ��) ���� ������ �α� 223 ��ϵDZ���� ������ �ſ� Ŀ�� �� �ִ�. ������ ������ Ŀ���� 224 ������ �������� �� ���þ ����Ͽ� CGI �α������� �ִ� 225 ����ũ�⸦ �����Ѵ�. ������ ũ�Ⱑ ������ ���� ������ �� 226 �̻� ������ ��������ʴ´�.</p> 227 228</div> 229</div> 230<div class="bottomlang"> 231<p><span>������ ���: </span><a href="/en/mod/mod_cgi.html" hreflang="en" rel="alternate" title="English"> en </a> | 232<a href="/ja/mod/mod_cgi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | 233<a href="/ko/mod/mod_cgi.html" title="Korean"> ko </a></p> 234</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 235<script type="text/javascript"><!--//--><![CDATA[//><!-- 236var comments_shortname = 'httpd'; 237var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_cgi.html'; 238(function(w, d) { 239 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 240 d.write('<div id="comments_thread"><\/div>'); 241 var s = d.createElement('script'); 242 s.type = 'text/javascript'; 243 s.async = true; 244 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 245 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 246 } 247 else { 248 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 249 } 250})(window, document); 251//--><!]]></script></div><div id="footer"> 252<p class="apache">Copyright 2013 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> 253<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 254if (typeof(prettyPrint) !== 'undefined') { 255 prettyPrint(); 256} 257//--><!]]></script> 258</body></html>