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
8 <title>¾ÆÆÄÄ¡ ÅõÅ丮¾ó: Server Side Includes ¼Ò°³ - 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">
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
16 <body id="manual-page"><div id="page-header">
17 <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>
18 <p class="apache">Apache HTTP Server Version 2.5</p>
19 <img alt="" src="../images/feather.gif" /></div>
20 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
22 <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.5</a> > <a href="./">How-To / Tutorials</a></div><div id="page-content"><div id="preamble"><h1>¾ÆÆÄÄ¡ ÅõÅ丮¾ó: Server Side Includes ¼Ò°³</h1>
24 <p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/howto/ssi.html" hreflang="en" rel="alternate" title="English"> en </a> |
25 <a href="../fr/howto/ssi.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
26 <a href="../ja/howto/ssi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
27 <a href="../ko/howto/ssi.html" title="Korean"> ko </a></p>
29 <div class="outofdate">ÀÌ ¹®¼´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù.
30 ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼¸¦ Âü°íÇϼ¼¿ä.</div>
32 <p>Server-side includes¸¦ »ç¿ëÇÏ¿© HTML ¹®¼¿¡ µ¿ÀûÀÎ ³»¿ëÀ»
35 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#related">¼Ò°³</a></li>
36 <li><img alt="" src="../images/down.gif" /> <a href="#what">SSI°¡ ¹«¾ùÀΰ¡?</a></li>
37 <li><img alt="" src="../images/down.gif" /> <a href="#configuring">SSI°¡ °¡´ÉÇϵµ·Ï ¼¹ö ¼³Á¤Çϱâ</a></li>
38 <li><img alt="" src="../images/down.gif" /> <a href="#basic">±âº» SSI Áö½Ã¾î</a></li>
39 <li><img alt="" src="../images/down.gif" /> <a href="#additionalexamples">Ãß°¡ ¿¹Á¦</a></li>
40 <li><img alt="" src="../images/down.gif" /> <a href="#config">ÀÌ¿Ü¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Â °ÍÀº?</a></li>
41 <li><img alt="" src="../images/down.gif" /> <a href="#exec">¸í·É¾î ½ÇÇàÇϱâ</a></li>
42 <li><img alt="" src="../images/down.gif" /> <a href="#advanced">°í±Þ SSI ±â¹ý</a></li>
43 <li><img alt="" src="../images/down.gif" /> <a href="#conclusion">°á·Ð</a></li>
44 </ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
45 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
47 <h2><a name="related" id="related">¼Ò°³</a></h2>
48 <table class="related"><tr><th>°ü·ÃµÈ ¸ðµâ</th><th>°ü·ÃµÈ Áö½Ã¾î</th></tr><tr><td><ul><li><code class="module"><a href="../mod/mod_include.html">mod_include</a></code></li><li><code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code></li><li><code class="module"><a href="../mod/mod_expires.html">mod_expires</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code></li><li><code class="directive"><a href="../mod/mod_mime.html#addtype">AddType</a></code></li><li><code class="directive"><a href="../mod/core.html#setoutputfilter">SetOutputFilter</a></code></li><li><code class="directive"><a href="../mod/mod_setenvif.html#browsermatchnocase">BrowserMatchNoCase</a></code></li></ul></td></tr></table>
50 <p>ÀÌ ±ÛÀº º¸Åë SSI¶ó°í ºÎ¸£´Â Server Side Includes¸¦ ¼³¸íÇÑ´Ù.
51 SSI°¡ °¡´ÉÇϵµ·Ï ¼¹ö¸¦ ¼³Á¤ÇÏ´Â ¹æ¹ý°ú HTML ÆäÀÌÁö¿¡ µ¿ÀûÀÎ
52 ³»¿ëÀ» Ãß°¡ÇÏ´Â ±âº»ÀûÀÎ SSI »ç¿ë¹ýÀ» ¼Ò°³ÇÑ´Ù.</p>
54 <p>ÀÌ ±ÛÀÇ µÞºÎºÐÀº SSI Áö½Ã¾î Á¶°Ç¹®°ú °°Àº °í±Þ±â¹ýÀ»
57 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
59 <h2><a name="what" id="what">SSI°¡ ¹«¾ùÀΰ¡?</a></h2>
61 <p>SSI (Server Side Includes)´Â HTML ÆäÀÌÁö¿¡ »ç¿ëÇÏ´Â Áö½Ã¾î·Î,
62 ÆäÀÌÁö¸¦ ¼ºñ½ºÇÒ¶§ ¼¹ö°¡ ó¸®ÇÑ´Ù. SSI¸¦ »ç¿ëÇϸé CGI
63 ÇÁ·Î±×·¥À̳ª ´Ù¸¥ µ¿ÀûÀÎ ±â¼ú·Î ÆäÀÌÁö Àüü¸¦ ¸¸µé¾î¼
64 ¼ºñ½ºÇÏÁö ¾Ê°íµµ HTML ÆäÀÌÁö¿¡ µ¿ÀûÀ¸·Î »ý¼ºÇÑ ³»¿ëÀ» Ãß°¡ÇÒ
67 <p>SSI¸¦ »ç¿ëÇÒÁö ¾Æ´Ï¸é ÇÁ·Î±×·¥À¸·Î ÆäÀÌÁö Àüü¸¦ »ý¼ºÇÒÁö
68 °áÁ¤Àº ÆäÀÌÁö¿¡¼ Á¤ÀûÀÎ ºÎºÐÀÌ ¸¹ÀºÁö¿Í ÆäÀÌÁö¸¦ ¼ºñ½ºÇÒ
69 ¶§¸¶´Ù ¾î´ÀÁ¤µµ¸¦ ´Ù½Ã °è»êÇؾßÇÒÁö¿¡ ´Þ·È´Ù. SSI´Â ÇöÀç
70 ½Ã°£°ú °°ÀÌ ÀûÀº Á¤º¸¸¦ Ãß°¡Çϴµ¥ ÁÁ´Ù. ±×·¯³ª ÆäÀÌÁö¸¦
71 ¼ºñ½ºÇÒ¶§ ÆäÀÌÁöÀÇ ´ëºÎºÐÀ» »ý¼ºÇØ¾ß ÇÑ´Ù¸é ´Ù¸¥ ¹æ¹ýÀ»
73 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
75 <h2><a name="configuring" id="configuring">SSI°¡ °¡´ÉÇϵµ·Ï ¼¹ö ¼³Á¤Çϱâ</a></h2>
78 <p>¼¹ö°¡ SSI¸¦ ó¸®ÇÏ·Á¸é <code>httpd.conf</code> ÆÄÀÏÀ̳ª
79 <code>.htaccess</code> ÆÄÀÏ¿¡¼ ´ÙÀ½ Áö½Ã¾î¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù.</p>
80 <div class="example"><p><code>
84 <p>±×·¯¸é ¾ÆÆÄÄ¡´Â ÆÄÀÏ¿¡¼ SSI Áö½Ã¾î¸¦ ó¸®ÇÑ´Ù. ¼³Á¤¿¡´Â
85 º¸Åë ¿©·¯ <code class="directive"><a href="../mod/core.html#options">Options</a></code> Áö½Ã¾î°¡
86 ÀÖ°í, ÀÌ Áö½Ã¾îµéÀº ¼·Î µ¤¾î½á¼ ¹«È¿·Î ¸¸µé´Ù. ±×·¡¼
87 Áö½Ã¾î¸¦ ¸Ç¸¶Áö¸·¿¡ ó¸®ÇϱâÀ§ÇØ º¸Åë SSI¸¦ ¿øÇϴ ƯÁ¤
88 µð·ºÅ丮¿¡¼ <code>Options</code>¸¦ »ç¿ëÇÑ´Ù.</p>
90 <p>¸ðµç ÆÄÀÏ¿¡¼ SSI Áö½Ã¾î¸¦ ó¸®ÇÏ´Â °ÍÀº ¾Æ´Ï´Ù. ¾ÆÆÄÄ¡¿¡°Ô
91 ¾î¶² ÆÄÀÏÀ» ó¸®ÇÒÁö ¾Ë·ÁÁà¾ß ÇÑ´Ù. µÎ°¡Áö ¹æ¹ýÀÌ ÀÖ´Ù.
92 Çϳª´Â ´ÙÀ½°ú °°Àº Áö½Ã¾î·Î <code>.shtml</code>°ú °°Àº ƯÁ¤
93 ÆÄÀÏ È®ÀåÀÚ¸¦ °¡Áø ÆÄÀÏÀ» ó¸®ÇÏ´Â ¹æ¹ýÀÌ´Ù.</p>
94 <div class="example"><p><code>
95 AddType text/html .shtml<br />
96 AddOutputFilter INCLUDES .shtml
99 <p>ÀÌ ¹æ¹ýÀÇ ´ÜÁ¡Àº ÀÌ¹Ì ÀÖ´Â ÆäÀÌÁö¿¡ SSI Áö½Ã¾î¸¦ Ãß°¡ÇÏ´Â
100 °æ¿ì SSI Áö½Ã¾î¸¦ ó¸®ÇϱâÀ§ÇØ <code>.shtml</code> È®ÀåÀÚ¸¦
101 ºÎ¿©Çϱ⶧¹®¿¡ ÆÄÀϸí°ú ÀÌ ÆäÀÌÁöÀÇ ¸ðµç ¸µÅ©¸¦ º¯°æÇؾß
104 <p>´Ù¸¥ ¹æ¹ýÀº <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>
105 Áö½Ã¾î¸¦ »ç¿ëÇÏ´Â ¹æ¹ýÀÌ´Ù.</p>
106 <div class="example"><p><code>
110 <p><code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>´Â
111 ½ÇÇà±ÇÇÑÀÌ ÀÖ´Â ÆÄÀÏ¿¡¼ SSI Áö½Ã¾î¸¦ ó¸®ÇÑ´Ù. ±×·¡¼ À̹Ì
112 ÀÖ´Â ÆäÀÌÁö¿¡ SSI Áö½Ã¾î¸¦ Ãß°¡ÇÑ´Ù¸é ÆÄÀϸíÀ» º¯°æÇÏÁö
113 ¾Ê°í <code>chmod</code>·Î ÆÄÀÏ¿¡ ½ÇÇà±ÇÇÑÀ» ÁÖ¸é µÈ´Ù.</p>
114 <div class="example"><p><code>
115 chmod +x pagename.html
118 <p>ÇÏÁö ¸»¾Æ¾ß ÇÒ °Í Çϳª. °¡²û <code>.shtml</code> ÆÄÀÏ¸í¿¡
119 °ñÄ¡¸¦ ¾ÎÁö¸»°í ¸ðµç <code>.html</code> ÆÄÀÏÀ» SSI ó¸®Ç϶ó°í
120 Ãæ°íÇÏ´Â »ç¶÷ÀÌ ÀÖ´Ù. ÀÌ »ç¶÷µéÀº ¾Æ¸¶µµ <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>¿¡ ´ëÇØ ¸ð¸£´Â
121 °Í °°´Ù. ¸í½ÉÇÒ Á¡Àº ÀÌ·¸°Ô ÇÏ¸é ¾ÆÆÄÄ¡´Â ÆÄÀÏ¿¡ SSI Áö½Ã¾î°¡
122 ¾ø´õ¶óµµ Ŭ¶óÀ̾ðÆ®·Î º¸³»´Â ¸ðµç ÆÄÀÏÀ» »ìÆìºÁ¾ß ÇÑ´Ù´Â
123 °ÍÀÌ´Ù. ¼º´ÉÀÌ ¸Å¿ì ´À·ÁÁú ¼ö ÀÖÀ¸¸ç, ÁÁÀº »ý°¢ÀÌ ¾Æ´Ï´Ù.</p>
125 <p>¹°·Ð À©µµ¿ìÁî¿¡¼´Â ½ÇÇà±ÇÇÑÀ̶õ °ÍÀÌ ¾ø±â¶§¹®¿¡ ÈÄÀÚ¸¦
128 <p>³»¿ëÀÌ µ¿ÀûÀÌ¿©¼ °è»êÇϱ⠾î·Æ±â¶§¹®¿¡ ¾ÆÆÄÄ¡ ±âº» ¼³Á¤Àº
129 SSI ÆäÀÌÁöÀÇ ÃÖ±Ù¼öÁ¤ÀÏ°ú content length HTTP Çì´õ¸¦ º¸³»Áö
130 ¾Ê´Â´Ù. ±×·¡¼ ¹®¼¸¦ ij½¬ÇÏÁö ¸øÇÏ°í Ŭ¶óÀ̾ðÆ®°¡ ´À³¢´Â
131 ¼º´ÉÀÌ ¶³¾îÁø´Ù. µÎ°¡Áö ÇØ°á¹æ¹ýÀÌ ÀÖ´Ù.</p>
134 <li><code>XBitHack Full</code> ¼³Á¤Àº »ç¿ëÇÑ´Ù. ±×·¯¸é
135 ¾ÆÆÄÄ¡´Â Æ÷ÇÔÇÏ´Â(include) ÆÄÀϵéÀÇ ¼öÁ¤ÀÏÀº ¹«½ÃÇÑü
136 ¿ø·¡ ¿äûÇÑ ÆÄÀÏÀÇ ³¯Â¥¸¸ º¸°í ÃÖ±Ù¼öÁ¤ÀÏÀ» ¾Ë¾Æ³½´Ù.</li>
138 <li><code class="module"><a href="../mod/mod_expires.html">mod_expires</a></code>¿¡ ÀÖ´Â Áö½Ã¾î¸¦ »ç¿ëÇÏ¿©
139 ÆÄÀÏ¿¡ Á÷Á¢ ¸¸±âÀÏÀ» ¼³Á¤ÇÏ¸é ºê¶ó¿ìÀú¿Í ÇÁ·Ï½Ã°¡ ¹®¼¸¦
142 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
143 <div class="section">
144 <h2><a name="basic" id="basic">±âº» SSI Áö½Ã¾î</a></h2>
146 <p>SSI Áö½Ã¾îÀÇ »ç¿ë¹ýÀº ´ÙÀ½°ú °°´Ù.</p>
147 <div class="example"><p><code>
148 <!--#element attribute=value attribute=value ... -->
151 <p>HTML ÁÖ¼®°°ÀÌ »ý°å±â¶§¹®¿¡ SSI ±â´ÉÀ» °¡µ¿ÇÏÁö ¾Ê¾Æµµ
152 HTML ¼Ò½º¿¡´Â ³ª¿ÀÁö¸¸ ºê¶ó¿ìÀú´Â ¹«½ÃÇÑ´Ù. SSI¸¦ ¿Ã¹Ù·Î
153 ¼³Á¤Çϸé Áö½Ã¾î¸¦ °á°ú°ªÀ¸·Î ¹Ù²Û´Ù.</p>
155 <p>element´Â ´ÙÀ½Áß Çϳª´Ù. ´ÙÀ½ ȸ¿¡ ´õ ÀÚ¼¼È÷ ¼³¸íÇÒ °ÍÀÌ´Ù.
156 Áö±ÝÀº SSI·Î ÇÒ ¼ö ÀÖ´Â ¸î°¡Áö ¿¹¸¦ º¸ÀδÙ</p>
158 <h3><a name="todaysdate" id="todaysdate">¿À´Ã ³¯Â¥</a></h3>
160 <div class="example"><p><code>
161 <!--#echo var="DATE_LOCAL" -->
164 <p><code>echo</code> element´Â º¯¼ö°ªÀ» ±×´ë·Î Ãâ·ÂÇÑ´Ù.
165 CGI ÇÁ·Î±×·¥¿¡ Á¦°øÇϴ ȯ°æº¯¼öµé ¿Ü¿¡µµ ¿©·¯ Ç¥ÁØ º¯¼ö°¡
166 ÀÖ´Ù. ¶Ç, <code>set</code> element¸¦ »ç¿ëÇÏ¿© Á÷Á¢ º¯¼ö¸¦
167 Á¤ÀÇÇÒ ¼öµµ ÀÖ´Ù.</p>
169 <p>³¯Â¥ Ãâ·Â Çü½ÄÀÌ ¸¶À½¿¡ µéÁö ¾Ê´Â´Ù¸é, ´ÙÀ½°ú °°ÀÌ
170 <code>config</code> elementÀÇ <code>timefmt</code> attribute¸¦
173 <div class="example"><p><code>
174 <!--#config timefmt="%A %B %d, %Y" --><br />
175 Today is <!--#echo var="DATE_LOCAL" -->
179 <h3><a name="lastmodified" id="lastmodified">ÆÄÀÏÀÇ ¼öÁ¤ÀÏ</a></h3>
181 <div class="example"><p><code>
182 ÀÌ ¹®¼´Â <!--#flastmod file="index.html" -->¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú´Ù
185 <p>ÀÌ elementµµ <code>timefmt</code> Çü½Ä ¼³Á¤¿¡ ´Þ·È´Ù.</p>
188 <h3><a name="cgi" id="cgi">CGI ÇÁ·Î±×·¥ °á°ú¸¦ Æ÷ÇÔÇϱâ</a></h3>
190 <p>ÀϹÝÀûÀÎ SSI »ç¿ë¹ýÁß Çϳª·Î, ¸¹ÀÌµé ¾Ö¿ëÇÏ´Â ``¹æ¹®¼ö
191 Ä«¿îÅÍ'' °°Àº CGI ÇÁ·Î±×·¥ °á°ú¸¦ Ãâ·ÂÇÑ´Ù.</p>
193 <div class="example"><p><code>
194 <!--#include virtual="/cgi-bin/counter.pl" -->
198 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
199 <div class="section">
200 <h2><a name="additionalexamples" id="additionalexamples">Ãß°¡ ¿¹Á¦</a></h2>
203 <p>´ÙÀ½Àº HTML ¹®¼¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ¸î°¡Áö SSI ¿¹Á¦´Ù.</p>
205 <h3><a name="docmodified" id="docmodified">ÀÌ ¹®¼°¡ ¾ðÁ¦ ¸¶Áö¸·À¸·Î
208 <p>¾Õ¿¡¼ SSI¸¦ »ç¿ëÇÏ¿© »ç¿ëÀÚ¿¡°Ô ¹®¼ÀÇ ÃÖ±Ù¼öÁ¤ÀÏÀ»
209 ¾Ë¸± ¼ö ÀÖ´Ù°í ¸»Çß´Ù. ±×·¯³ª ½ÇÁ¦ ¹æ¹ýÀº ¾Ë·ÁÁÖÁö ¾Ê¾Ò´Ù.
210 ´ÙÀ½ Äڵ带 HTML ¹®¼¿¡ »ç¿ëÇϸé ÆäÀÌÁö¿¡ ½Ã°£ ±â·ÏÀ» ³²±ä´Ù.
211 ¹°·Ð À§¿¡¼ ¼³¸íÇÑ´ë·Î SSI°¡ ¿Ã¹Ù·Î ÀÛµ¿ÇØ¾ß ÇÑ´Ù.</p>
212 <div class="example"><p><code>
213 <!--#config timefmt="%A %B %d, %Y" --><br />
214 ÀÌ ¹®¼´Â <!--#flastmod file="ssi.shtml" -->¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú´Ù;
217 <p>¹°·Ð <code>ssi.shtml</code>´ë½Å ¿øÇÏ´Â ½ÇÁ¦ ÆÄÀϸíÀ»
218 »ç¿ëÇÑ´Ù. ¾Æ¹« ÆäÀÌÁö¿¡¶óµµ ºÙ¿©³ÖÀ» ¼ö ÀÖ´Â ¹ü¿ëÄڵ带
219 ¿øÇÑ´Ù¸é, ÆÄÀÏ¸í ´ë½Å <code>LAST_MODIFIED</code> º¯¼ö¸¦
221 <div class="example"><p><code>
222 <!--#config timefmt="%D" --><br />
223 This file last modified <!--#echo var="LAST_MODIFIED" -->
226 <p><code>timefmt</code> Çü½Ä¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ Á¤º¸´Â °Ë»ö¿£Áø¿¡¼
227 <code>strftime</code>À» ã¾ÆºÁ¶ó. ¹®¹ýÀº °°´Ù.</p>
230 <h3><a name="standard-footer" id="standard-footer">Ç¥ÁØ ÆäÀÌÁö ÇÏ´ÜÀ» Æ÷ÇÔÇϱâ</a></h3>
233 <p>¿©·¯ ÆäÀÌÁö°¡ ÀÖ´Â »çÀÌÆ®¸¦ °ü¸®ÇÑ´Ù¸é ÆäÀÌÁö Àüü¸¦
234 ¼öÁ¤ÇÏ´Â °ÍÀº, ƯÈ÷ ÆäÀÌÁöµéÀÌ Ç¥ÁØ ¿Ü°üÀ» °¡Áöµµ·Ï ¼öÁ¤ÇÏ´Â
235 °ÍÀº Á¤¸»·Î ±«·Ó´Ù.</p>
237 <p>ÆäÀÌÁö »ó´Ü(header)°ú ÇÏ´Ü(footer)À» ÆÄÀÏ·Î Æ÷ÇÔÇÏ¿©
238 ÀÌ·± ¼öÁ¤ÀÇ ºÎ´ãÀ» ´ú ¼ö ÀÖ´Ù. ¸ðµç ÆäÀÌÁö¿¡¼
239 <code>include</code> SSI ¸í·É¾î¸¦ »ç¿ëÇÏ¿© ÆäÀÌÁö ÇÏ´Ü ÆÄÀÏ
240 Çϳª¸¦ Æ÷ÇÔÇÏ¸é µÈ´Ù. <code>include</code> elementÀÇ
241 <code>file</code> attribute³ª <code>virtual</code> attribute·Î
242 Æ÷ÇÔÇÒ ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù. <code>file</code> attribute´Â <em>ÇöÀç
243 µð·ºÅ丮¿¡ »ó´ëÀûÀÎ</em> ÆÄÀÏ°æ·Î´Ù. Áï, (/·Î ½ÃÀÛÇÏ´Â)
244 Àý´ëÆÄÀÏ°æ·Î³ª °æ·Î ¾È¿¡ ../¸¦ »ç¿ëÇÒ ¼ö ¾ø´Ù. ¾Æ¸¶µµ ¼ºñ½ºÇÏ´Â
245 ¹®¼ÀÇ »ó´ë URLÀ» ÁöÁ¤ÇÒ ¼ö ÀÖ´Â <code>virtual</code> attribute°¡
246 ´õ À¯¿ëÇÒ °ÍÀÌ´Ù. °æ·Î¸¦ /·Î ½ÃÀÛÇÒ ¼ö ÀÖÁö¸¸, Æ÷ÇÔÇÏ·Á´Â
247 ÆÄÀÏÀÌ ¼ºñ½ºÇÏ´Â ÆÄÀÏ°ú °°Àº ¼¹ö¿¡ ÀÖ¾î¾ß ÇÑ´Ù.</p>
248 <div class="example"><p><code>
249 <!--#include virtual="/footer.html" -->
252 <p>³ª´Â º¸Åë ÀÌ µÎ°¡Áö¸¦ ÇÕÃļ Æ÷ÇÔÇÒ ÆäÀÌÁö ÇÏ´Ü ÆÄÀÏ¿¡
253 <code>LAST_MODIFIED</code> Áö½Ã¾î¸¦ ³Ö´Â´Ù. Æ÷ÇÔÇÏ·Á´Â ÆÄÀÏ¿¡µµ
254 SSI Áö½Ã¾î°¡ ³ª¿Ã ¼ö ÀÖÀ¸¸ç, ÀÌ·¸°Ô Æ÷ÇÔÇÑ ÆÄÀÏÀÌ ´Ù¸¥ ÆÄÀÏÀ»
255 Æ÷ÇÔÇÏ´Â ½ÄÀ¸·Î ¿©·¯¹ø °è¼Ó Æ÷ÇÔÇÒ ¼öµµ ÀÖ´Ù.</p>
258 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
259 <div class="section">
260 <h2><a name="config" id="config">ÀÌ¿Ü¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Â °ÍÀº?</a></h2>
263 <p>½Ã°£ Çü½Ä <code>config</code>(¼³Á¤) ¿Ü¿¡ µÎ°¡Áö¸¦ ´õ
264 <code>config</code>(¼³Á¤)ÇÒ ¼ö ÀÖ´Ù.</p>
266 <p>º¸Åë SSI Áö½Ã¾î°¡ À߸øµÇ¸é ´ÙÀ½°ú °°Àº ¹®±¸°¡ ³ª¿Â´Ù</p>
267 <div class="example"><p><code>
268 [an error occurred while processing this directive]
271 <p>ÀÌ ¹®±¸¸¦ º¯°æÇÏ°í ½Í´Ù¸é <code>config</code> elementÀÇ
272 <code>errmsg</code> attribute¸¦ »ç¿ëÇÏ¿© º¯°æÇÑ´Ù.</p>
273 <div class="example"><p><code>
274 <!--#config errmsg="[It appears that you don't know how to use SSI]" -->
277 <p>»çÀÌÆ®¸¦ ¼ºñ½ºÇϱâ Àü¿¡ ¸ðµç SSI Áö½Ã¾î ¹®Á¦¸¦ ÇØ°áÇÏ¿©
278 »ç¿ëÀÚ°¡ ÀÌ·± ¹®±¸¸¦ º¸Áö ¾Ê±æ ¹Ù¶õ´Ù. (±×·¸Áö?)</p>
280 <p>±×¸®°í <code>sizefmt</code> attribute°¡ ¹ÝȯÇÏ´Â ÆÄÀÏÅ©±â
281 Çü½ÄÀ» <code>config</code>(¼³Á¤)ÇÒ ¼ö ÀÖ´Ù. ¹ÙÀÌÆ®·Î Å©±â¸¦
282 º¸¿©ÁÖ·Á¸é <code>bytes</code>, ÀûÀýÈ÷ Kb³ª Mb·Î Å©±â¸¦
283 º¸¿©ÁÖ·Á¸é <code>abbrev</code>¸¦ »ç¿ëÇÑ´Ù.</p>
284 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
285 <div class="section">
286 <h2><a name="exec" id="exec">¸í·É¾î ½ÇÇàÇϱâ</a></h2>
289 <p>³ª´Â ´ÙÀ½ ´Þ¿¡ ÀÛÀº CGI ÇÁ·Î±×·¥°ú SSI¸¦ °°ÀÌ »ç¿ëÇÏ´Â
290 ±ÛÀ» ¾µ ¿¹Á¤ÀÌ´Ù. Áö±ÝÀº <code>exec</code> element·Î ÇÒ
291 ¼ö ÀÖ´Â ´Ù¸¥ °ÍµéÀ» ¼³¸íÇÒ °ÍÀÌ´Ù. SSI´Â ½ÇÁ¦ ½©À» (Á¤È®È÷´Â
292 <code>/bin/sh</code>³ª Win32¸¦ »ç¿ëÇÑ´Ù¸é DOS ½©) »ç¿ëÇÏ¿©
293 ¸í·É¾î¸¦ ½ÇÇàÇÑ´Ù. ¿¹¸¦ µé¾î, ´ÙÀ½Àº µð·ºÅ丮 ¸ñ·ÏÀ» º¸¿©ÁØ´Ù.</p>
294 <div class="example"><p><code>
296 <!--#exec cmd="ls" --><br />
300 <p>or, on Windows</p>
301 <div class="example"><p><code>
303 <!--#exec cmd="dir" --><br />
307 <p><code>dir</code> Ãâ·Â¿¡ ºê¶ó¿ìÀú°¡ È¥µ¿ÇÒ
308 ``<<code>dir</code>>'' ¹®ÀÚ¿ÀÌ Æ÷ÇÔµÇÀֱ⶧¹®¿¡,
309 À©µµ¿ìÁî¿¡¼ ÀÌ Áö½Ã¾î¸¦ »ç¿ëÇÏ¸é °á°ú°¡ Á¶±Ý ÀÌ»óÇÒ °ÍÀÌ´Ù.</p>
311 <p>ÀÌ ±â´ÉÀº <code>exec</code> ű׿¡ »ç¿ëÇÑ ¾î¶² ¸í·É¾î¶óµµ
312 ½ÇÇàÇÒ ¼ö Àֱ⶧¹®¿¡ ¸Å¿ì À§ÇèÇÏ´Ù. ``¹æ¸í·Ï''°ú °°ÀÌ »ç¿ëÀÚ°¡
313 À¥ÆäÀÌÁö ³»¿ëÀ» ¼öÁ¤ÇÒ ¼ö Àִ ȯ°æÀ̶ó¸é, ÀÌ ±â´ÉÀ» Àý´ë·Î
314 »ç¿ëÇؼ± ¾ÈµÈ´Ù. <code>Options</code> Áö½Ã¾î¿¡
315 <code>IncludesNOEXEC</code> ¾Æ±Ô¸ÕÆ®¸¦ »ç¿ëÇÏ¿© SSI¸¦ Çã¿ëÇÏÁö¸¸
316 <code>exec</code> ±â´ÉÀ» ¸·À» ¼ö ÀÖ´Ù.</p>
317 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
318 <div class="section">
319 <h2><a name="advanced" id="advanced">°í±Þ SSI ±â¹ý</a></h2>
322 <p>³»¿ëÀ» Ãâ·ÂÇÏ´Â ±â´É ¿Ü¿¡ ¾ÆÆÄÄ¡ SSI´Â º¯¼ö ¼³Á¤ÀÌ °¡´ÉÇÏ°í,
323 ºñ±³¹®°ú Á¶°Ç¹®¿¡ ÀÌ º¯¼ö¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>
325 <h3><a name="caveat" id="caveat">°æ°í</a></h3>
327 <p>ÀÌ ±Û¿¡¼ ¼³¸íÇÏ´Â ´ëºÎºÐÀÇ ±â´ÉÀº ¾ÆÆÄÄ¡ 1.2 ÀÌÈĺÎÅÍ
328 »ç¿ëÇÒ ¼ö ÀÖ´Ù. ¹°·Ð, ¾ÆÆÄÄ¡ 1.2 ÀÌ»óÀ» »ç¿ëÇÏÁö ¾Ê´Â´Ù¸é
329 ¾Æ¸¶µµ »¡¸® ¾÷±×·¹À̵åÇØ¾ß ÇÑ´Ù. Çضó. Áö±Ý Çضó. ±â´Ù¸±
333 <h3><a name="variables" id="variables">º¯¼ö ¼³Á¤</a></h3>
335 <p><code>set</code> Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© ³ªÁß¿¡ »ç¿ëÇÒ º¯¼ö¸¦
336 ¼³Á¤ÇÒ ¼ö ÀÖ´Ù. ¾ÕÀ¸·Î º¯¼ö°¡ ÇÊ¿äÇϱ⶧¹®¿¡ ¸ÕÀú ¼³¸íÇÑ´Ù.
337 ¹®¹ýÀº ´ÙÀ½°ú °°´Ù.</p>
338 <div class="example"><p><code>
339 <!--#set var="name" value="Rich" -->
342 <p>´ÙÀ½°ú °°ÀÌ °ªÀ» ¹®ÀÚ±×´ë·Î ¼³Á¤ÇÏÁö ¾Ê°í <a href="../env.html">ȯ°æº¯¼ö</a>³ª À§¿¡¼ ¼³¸íÇÑ º¯¼ö(¿¹¸¦
343 µé¾î, <code>LAST_MODIFIED</code>)¿Í °°ÀÌ ´Ù¸¥ º¯¼ö¸¦ »ç¿ëÇÏ¿©
344 º¯¼ö°ªÀ» ¼³Á¤ÇÒ ¼öµµ ÀÖ´Ù. À̶§ º¯¼ö¸í ¾Õ¿¡ ´Þ·¯ Ç¥½Ã($)¸¦
345 ºÙ¿©¼ ¹®ÀÚ¿ÀÌ ¾Æ´Ñ º¯¼öÀÓÀ» Ç¥½ÃÇÑ´Ù.</p>
347 <div class="example"><p><code> <!--#set var="modified" value="$LAST_MODIFIED" -->
350 <p>º¯¼ö°ª¿¡ ´Þ·¯ ¹®ÀÚ¸¦ ±×´ë·Î ÀÔ·ÂÇÏ·Á¸é ´Þ·¯ Ç¥½Ã ¾Õ¿¡
351 ¹é½½·¡½¬¸¦ »ç¿ëÇÑ´Ù.</p>
352 <div class="example"><p><code>
353 <!--#set var="cost" value="\$100" -->
356 <p>¸¶Áö¸·À¸·Î ±ä ¹®ÀÚ¿ Áß°£¿¡ º¯¼ö¸¦ »ç¿ëÇϴµ¥ µÚ¿¡ ÀÖ´Â
357 ¹®ÀÚµµ º¯¼ö¸íÀ¸·Î ¿ÀÀÎÇÏ¿© È¥µ¿µÇ´Â °æ¿ì, º¯¼ö¸íÀ» ´ë°ýÈ£·Î
358 ¹¾î¼ È®½ÇÈ÷ ÇÑ´Ù. (ÁÁÀº ¿¹¸¦ ã±â ÈûµéÁö¸¸, ¹«½¼ ¸»ÀÎÁö
359 ÀÌÇØÇÏ±æ ¹Ù¶õ´Ù.)</p>
360 <div class="example"><p><code>
361 <!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" -->
365 <h3><a name="conditional" id="conditional">Á¶°Ç Ç¥Çö½Ä</a></h3>
368 <p>º¯¼ö¸¦ ¼³Á¤ÇÏ°í ºñ±³ÇÒ ¼ö ÀÖÀ¸´Ï Á¶°Ç¹®ÀÌ °¡´ÉÇÏ´Ù. ÀÌÁ¦
369 SSI°¡ ÀÏÁ¾ÀÇ °£´ÜÇÑ ÇÁ·Î±×·¡¹Ö¾ð¾î°¡ µÈ´Ù.
370 <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>´Â Á¶°Ç¹®À» ¸¸µå´Â <code>if</code>,
371 <code>elif</code>, <code>else</code>, <code>endif</code>
372 ±¸Á¶¸¦ Á¦°øÇÑ´Ù. ½ÇÁ¦ ÇÑ ÆäÀÌÁö·Î ¿©·¯ ³í¸®ÀûÀÎ ÆäÀÌÁö¸¦
375 <p>Á¶°Ç¹® ±¸Á¶´Â ´ÙÀ½°ú °°´Ù.</p>
376 <div class="example"><p><code>
377 <!--#if expr="test_condition" --><br />
378 <!--#elif expr="test_condition" --><br />
379 <!--#else --><br />
383 <p><em>test_condition</em>¿¡´Â ¾î¶² ³í¸®ºñ±³¶óµµ »ç¿ëÇÒ
384 ¼ö ÀÖ´Ù. °ªÀ» ´Ù¸¥ °ª°ú ºñ±³Çϰųª, ƯÁ¤ °ªÀÌ ``Âü''ÀÎÁö
385 °Ë»çÇÑ´Ù. (¹®ÀÚ¿ÀÌ ºñ¾îÀÖÁö ¾ÊÀ¸¸é ÂüÀÌ´Ù.) »ç¿ë°¡´ÉÇÑ
386 ºñ±³ ¿¬»êÀÚ¸¦ ¸ðµÎ º¸·Á¸é, <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
387 ¹®¼¸¦ Âü°íÇ϶ó. ´ÙÀ½Àº Á¶°Ç¹®À» »ç¿ëÇÑ ¸î°¡Áö ¿¹Á¦´Ù.</p>
389 <p>¼³Á¤ÆÄÀÏ¿¡ ´ÙÀ½ ÁÙÀ» Ãß°¡ÇÑ´Ù.</p>
390 <div class="example"><p><code>
391 BrowserMatchNoCase macintosh Mac<br />
392 BrowserMatchNoCase MSIE InternetExplorer
395 <p>Ŭ¶óÀ̾ðÆ®°¡ ¸ÆŲÅä½Ã¿¡¼ ½ÇÇàÇÏ´Â Internet Explorer¶ó¸é
396 ȯ°æº¯¼ö ``Mac''°ú ``InternetExplorer'' ¸ðµÎ ÂüÀ¸·Î ¼³Á¤ÇÑ´Ù.</p>
398 <p>±×¸®°í SSI ¹®¼¿¡ ´ÙÀ½°ú °°ÀÌ Àû´Â´Ù.</p>
399 <div class="example"><p><code>
400 <!--#if expr="${Mac} && ${InternetExplorer}" --><br />
401 ¿©±â¿¡ »ç°ú¹®°¡ ³ª¿Â´Ù<br />
402 <!--#else --><br />
403 ¿©±â¿¡ ¸ÚÁø JavaScript Äڵ尡 ³ª¿Â´Ù<br />
407 <p>³»°¡ ¸ÅŲÅä½Ã IE¿¡ ¹Ý°¨ÀÌ ÀÖ´Â °ÍÀº ¾Æ´Ï´Ù. ³ª´Â ´ÜÁö
408 Àú¹øÁÖ¿¡ ´Ù¸¥ °÷¿¡¼´Â ¹®Á¦°¡ ¾ø´Â JavaScript Äڵ尡 ¸ÅŲÅä½Ã
409 IE¿¡¼´Â µ¿ÀÛÇÏÁö ¾Ê¾Æ¼ ¸î½Ã°£À» °í»ýÇß´Ù. À§´Â ÀÓ½Ã
412 <p>(Á÷Á¢ Á¤ÀÇÇÏ¿´°Ç ÀÏ¹Ý È¯°æº¯¼öÀÌ°Ç) ¾î¶² º¯¼ö¶óµµ Á¶°Ç¹®¿¡
413 »ç¿ëÇÒ ¼ö ÀÖ´Ù. ¾Æ¶óÄ¡´Â <code>SetEnvIf</code>³ª ´Ù¸¥ °ü·Ã
414 Áö½Ã¾î·Î ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÒ ¼ö Àֱ⶧¹®¿¡ CGI ¾øÀ̵µ ¸ÚÁö°Ô
415 µ¿ÀûÀÎ ³»¿ëÀ» ¸¸µé ¼ö ÀÖ´Ù.</p>
417 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
418 <div class="section">
419 <h2><a name="conclusion" id="conclusion">°á·Ð</a></h2>
421 <p>SSI´Â È®½ÇÈ÷ CGI³ª µ¿ÀûÀÎ À¥ÆäÀÌÁö¸¦ »ý¼ºÇÏ´Â ´Ù¸¥ ±â¼úÀ»
422 ´ëüÇÒ ¼ö ¾ø´Ù. ±×·¯³ª ¸¹Àº Ãß°¡ ÀÛ¾÷¾øÀÌ ÆäÀÌÁö¿¡ µ¿ÀûÀÎ
423 ³»¿ëÀ» Á¶±Ý Ãß°¡Çϱ⿡´Â ÈǸ¢ÇÑ ¹æ¹ýÀÌ´Ù.</p>
425 <div class="bottomlang">
426 <p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/howto/ssi.html" hreflang="en" rel="alternate" title="English"> en </a> |
427 <a href="../fr/howto/ssi.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
428 <a href="../ja/howto/ssi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
429 <a href="../ko/howto/ssi.html" title="Korean"> ko </a></p>
430 </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>
431 <script type="text/javascript"><!--//--><![CDATA[//><!--
432 var comments_shortname = 'httpd';
433 var comments_identifier = 'http://httpd.apache.org/docs/trunk/howto/ssi.html';
435 if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
436 d.write('<div id="comments_thread"><\/div>');
437 var s = d.createElement('script');
438 s.type = 'text/javascript';
440 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
441 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
444 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
446 })(window, document);
447 //--><!]]></script></div><div id="footer">
448 <p class="apache">Copyright 2012 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>
449 <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[//><!--
450 if (typeof(prettyPrint) !== 'undefined') {