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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
|
<?xml version="1.0" encoding="EUC-KR"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko"><head><!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<title>¾ÆÆÄÄ¡ ÅõÅ丮¾ó: Server Side Includes ¼Ò°³ - Apache HTTP Server</title>
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
<body id="manual-page"><div id="page-header">
<p class="menu"><a href="../mod/">¸ðµâ</a> | <a href="../mod/directives.html">Áö½Ã¾îµé</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">¿ë¾î</a> | <a href="../sitemap.html">»çÀÌÆ®¸Ê</a></p>
<p class="apache">Apache HTTP Server Version 2.5</p>
<img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
<div id="path">
<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>
<div class="toplang">
<p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/howto/ssi.html" hreflang="en" rel="alternate" title="English"> en </a> |
<a href="../fr/howto/ssi.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
<a href="../ja/howto/ssi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/howto/ssi.html" title="Korean"> ko </a></p>
</div>
<div class="outofdate">ÀÌ ¹®¼´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù.
ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼¸¦ Âü°íÇϼ¼¿ä.</div>
<p>Server-side includes¸¦ »ç¿ëÇÏ¿© HTML ¹®¼¿¡ µ¿ÀûÀÎ ³»¿ëÀ»
Ãß°¡ÇÒ ¼ö ÀÖ´Ù.</p>
</div>
<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#related">¼Ò°³</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#what">SSI°¡ ¹«¾ùÀΰ¡?</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#configuring">SSI°¡ °¡´ÉÇϵµ·Ï ¼¹ö ¼³Á¤Çϱâ</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#basic">±âº» SSI Áö½Ã¾î</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#additionalexamples">Ãß°¡ ¿¹Á¦</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#config">ÀÌ¿Ü¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Â °ÍÀº?</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#exec">¸í·É¾î ½ÇÇàÇϱâ</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#advanced">°í±Þ SSI ±â¹ý</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#conclusion">°á·Ð</a></li>
</ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="related" id="related">¼Ò°³</a></h2>
<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>
<p>ÀÌ ±ÛÀº º¸Åë SSI¶ó°í ºÎ¸£´Â Server Side Includes¸¦ ¼³¸íÇÑ´Ù.
SSI°¡ °¡´ÉÇϵµ·Ï ¼¹ö¸¦ ¼³Á¤ÇÏ´Â ¹æ¹ý°ú HTML ÆäÀÌÁö¿¡ µ¿ÀûÀÎ
³»¿ëÀ» Ãß°¡ÇÏ´Â ±âº»ÀûÀÎ SSI »ç¿ë¹ýÀ» ¼Ò°³ÇÑ´Ù.</p>
<p>ÀÌ ±ÛÀÇ µÞºÎºÐÀº SSI Áö½Ã¾î Á¶°Ç¹®°ú °°Àº °í±Þ±â¹ýÀ»
¼³¸íÇÑ´Ù.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="what" id="what">SSI°¡ ¹«¾ùÀΰ¡?</a></h2>
<p>SSI (Server Side Includes)´Â HTML ÆäÀÌÁö¿¡ »ç¿ëÇÏ´Â Áö½Ã¾î·Î,
ÆäÀÌÁö¸¦ ¼ºñ½ºÇÒ¶§ ¼¹ö°¡ ó¸®ÇÑ´Ù. SSI¸¦ »ç¿ëÇϸé CGI
ÇÁ·Î±×·¥À̳ª ´Ù¸¥ µ¿ÀûÀÎ ±â¼ú·Î ÆäÀÌÁö Àüü¸¦ ¸¸µé¾î¼
¼ºñ½ºÇÏÁö ¾Ê°íµµ HTML ÆäÀÌÁö¿¡ µ¿ÀûÀ¸·Î »ý¼ºÇÑ ³»¿ëÀ» Ãß°¡ÇÒ
¼ö ÀÖ´Ù.</p>
<p>SSI¸¦ »ç¿ëÇÒÁö ¾Æ´Ï¸é ÇÁ·Î±×·¥À¸·Î ÆäÀÌÁö Àüü¸¦ »ý¼ºÇÒÁö
°áÁ¤Àº ÆäÀÌÁö¿¡¼ Á¤ÀûÀÎ ºÎºÐÀÌ ¸¹ÀºÁö¿Í ÆäÀÌÁö¸¦ ¼ºñ½ºÇÒ
¶§¸¶´Ù ¾î´ÀÁ¤µµ¸¦ ´Ù½Ã °è»êÇؾßÇÒÁö¿¡ ´Þ·È´Ù. SSI´Â ÇöÀç
½Ã°£°ú °°ÀÌ ÀûÀº Á¤º¸¸¦ Ãß°¡Çϴµ¥ ÁÁ´Ù. ±×·¯³ª ÆäÀÌÁö¸¦
¼ºñ½ºÇÒ¶§ ÆäÀÌÁöÀÇ ´ëºÎºÐÀ» »ý¼ºÇØ¾ß ÇÑ´Ù¸é ´Ù¸¥ ¹æ¹ýÀ»
ã¾ÆºÁ¾ß ÇÑ´Ù.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="configuring" id="configuring">SSI°¡ °¡´ÉÇϵµ·Ï ¼¹ö ¼³Á¤Çϱâ</a></h2>
<p>¼¹ö°¡ SSI¸¦ ó¸®ÇÏ·Á¸é <code>httpd.conf</code> ÆÄÀÏÀ̳ª
<code>.htaccess</code> ÆÄÀÏ¿¡¼ ´ÙÀ½ Áö½Ã¾î¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù.</p>
<div class="example"><p><code>
Options +Includes
</code></p></div>
<p>±×·¯¸é ¾ÆÆÄÄ¡´Â ÆÄÀÏ¿¡¼ SSI Áö½Ã¾î¸¦ ó¸®ÇÑ´Ù. ¼³Á¤¿¡´Â
º¸Åë ¿©·¯ <code class="directive"><a href="../mod/core.html#options">Options</a></code> Áö½Ã¾î°¡
ÀÖ°í, ÀÌ Áö½Ã¾îµéÀº ¼·Î µ¤¾î½á¼ ¹«È¿·Î ¸¸µé´Ù. ±×·¡¼
Áö½Ã¾î¸¦ ¸Ç¸¶Áö¸·¿¡ ó¸®ÇϱâÀ§ÇØ º¸Åë SSI¸¦ ¿øÇϴ ƯÁ¤
µð·ºÅ丮¿¡¼ <code>Options</code>¸¦ »ç¿ëÇÑ´Ù.</p>
<p>¸ðµç ÆÄÀÏ¿¡¼ SSI Áö½Ã¾î¸¦ ó¸®ÇÏ´Â °ÍÀº ¾Æ´Ï´Ù. ¾ÆÆÄÄ¡¿¡°Ô
¾î¶² ÆÄÀÏÀ» ó¸®ÇÒÁö ¾Ë·ÁÁà¾ß ÇÑ´Ù. µÎ°¡Áö ¹æ¹ýÀÌ ÀÖ´Ù.
Çϳª´Â ´ÙÀ½°ú °°Àº Áö½Ã¾î·Î <code>.shtml</code>°ú °°Àº ƯÁ¤
ÆÄÀÏ È®ÀåÀÚ¸¦ °¡Áø ÆÄÀÏÀ» ó¸®ÇÏ´Â ¹æ¹ýÀÌ´Ù.</p>
<div class="example"><p><code>
AddType text/html .shtml<br />
AddOutputFilter INCLUDES .shtml
</code></p></div>
<p>ÀÌ ¹æ¹ýÀÇ ´ÜÁ¡Àº ÀÌ¹Ì ÀÖ´Â ÆäÀÌÁö¿¡ SSI Áö½Ã¾î¸¦ Ãß°¡ÇÏ´Â
°æ¿ì SSI Áö½Ã¾î¸¦ ó¸®ÇϱâÀ§ÇØ <code>.shtml</code> È®ÀåÀÚ¸¦
ºÎ¿©Çϱ⶧¹®¿¡ ÆÄÀϸí°ú ÀÌ ÆäÀÌÁöÀÇ ¸ðµç ¸µÅ©¸¦ º¯°æÇؾß
ÇÏ´Â Á¡ÀÌ´Ù.</p>
<p>´Ù¸¥ ¹æ¹ýÀº <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>
Áö½Ã¾î¸¦ »ç¿ëÇÏ´Â ¹æ¹ýÀÌ´Ù.</p>
<div class="example"><p><code>
XBitHack on
</code></p></div>
<p><code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>´Â
½ÇÇà±ÇÇÑÀÌ ÀÖ´Â ÆÄÀÏ¿¡¼ SSI Áö½Ã¾î¸¦ ó¸®ÇÑ´Ù. ±×·¡¼ À̹Ì
ÀÖ´Â ÆäÀÌÁö¿¡ SSI Áö½Ã¾î¸¦ Ãß°¡ÇÑ´Ù¸é ÆÄÀϸíÀ» º¯°æÇÏÁö
¾Ê°í <code>chmod</code>·Î ÆÄÀÏ¿¡ ½ÇÇà±ÇÇÑÀ» ÁÖ¸é µÈ´Ù.</p>
<div class="example"><p><code>
chmod +x pagename.html
</code></p></div>
<p>ÇÏÁö ¸»¾Æ¾ß ÇÒ °Í Çϳª. °¡²û <code>.shtml</code> ÆÄÀÏ¸í¿¡
°ñÄ¡¸¦ ¾ÎÁö¸»°í ¸ðµç <code>.html</code> ÆÄÀÏÀ» SSI ó¸®Ç϶ó°í
Ãæ°íÇÏ´Â »ç¶÷ÀÌ ÀÖ´Ù. ÀÌ »ç¶÷µéÀº ¾Æ¸¶µµ <code class="directive"><a href="../mod/mod_include.html#xbithack">XBitHack</a></code>¿¡ ´ëÇØ ¸ð¸£´Â
°Í °°´Ù. ¸í½ÉÇÒ Á¡Àº ÀÌ·¸°Ô ÇÏ¸é ¾ÆÆÄÄ¡´Â ÆÄÀÏ¿¡ SSI Áö½Ã¾î°¡
¾ø´õ¶óµµ Ŭ¶óÀ̾ðÆ®·Î º¸³»´Â ¸ðµç ÆÄÀÏÀ» »ìÆìºÁ¾ß ÇÑ´Ù´Â
°ÍÀÌ´Ù. ¼º´ÉÀÌ ¸Å¿ì ´À·ÁÁú ¼ö ÀÖÀ¸¸ç, ÁÁÀº »ý°¢ÀÌ ¾Æ´Ï´Ù.</p>
<p>¹°·Ð À©µµ¿ìÁî¿¡¼´Â ½ÇÇà±ÇÇÑÀ̶õ °ÍÀÌ ¾ø±â¶§¹®¿¡ ÈÄÀÚ¸¦
»ç¿ëÇÒ ¼ö ¾ø´Ù.</p>
<p>³»¿ëÀÌ µ¿ÀûÀÌ¿©¼ °è»êÇϱ⠾î·Æ±â¶§¹®¿¡ ¾ÆÆÄÄ¡ ±âº» ¼³Á¤Àº
SSI ÆäÀÌÁöÀÇ ÃÖ±Ù¼öÁ¤ÀÏ°ú content length HTTP Çì´õ¸¦ º¸³»Áö
¾Ê´Â´Ù. ±×·¡¼ ¹®¼¸¦ ij½¬ÇÏÁö ¸øÇÏ°í Ŭ¶óÀ̾ðÆ®°¡ ´À³¢´Â
¼º´ÉÀÌ ¶³¾îÁø´Ù. µÎ°¡Áö ÇØ°á¹æ¹ýÀÌ ÀÖ´Ù.</p>
<ol>
<li><code>XBitHack Full</code> ¼³Á¤Àº »ç¿ëÇÑ´Ù. ±×·¯¸é
¾ÆÆÄÄ¡´Â Æ÷ÇÔÇÏ´Â(include) ÆÄÀϵéÀÇ ¼öÁ¤ÀÏÀº ¹«½ÃÇÑü
¿ø·¡ ¿äûÇÑ ÆÄÀÏÀÇ ³¯Â¥¸¸ º¸°í ÃÖ±Ù¼öÁ¤ÀÏÀ» ¾Ë¾Æ³½´Ù.</li>
<li><code class="module"><a href="../mod/mod_expires.html">mod_expires</a></code>¿¡ ÀÖ´Â Áö½Ã¾î¸¦ »ç¿ëÇÏ¿©
ÆÄÀÏ¿¡ Á÷Á¢ ¸¸±âÀÏÀ» ¼³Á¤ÇÏ¸é ºê¶ó¿ìÀú¿Í ÇÁ·Ï½Ã°¡ ¹®¼¸¦
ij½¬ÇÒ ¼ö ÀÖ´Ù.</li>
</ol>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="basic" id="basic">±âº» SSI Áö½Ã¾î</a></h2>
<p>SSI Áö½Ã¾îÀÇ »ç¿ë¹ýÀº ´ÙÀ½°ú °°´Ù.</p>
<div class="example"><p><code>
<!--#element attribute=value attribute=value ... -->
</code></p></div>
<p>HTML ÁÖ¼®°°ÀÌ »ý°å±â¶§¹®¿¡ SSI ±â´ÉÀ» °¡µ¿ÇÏÁö ¾Ê¾Æµµ
HTML ¼Ò½º¿¡´Â ³ª¿ÀÁö¸¸ ºê¶ó¿ìÀú´Â ¹«½ÃÇÑ´Ù. SSI¸¦ ¿Ã¹Ù·Î
¼³Á¤Çϸé Áö½Ã¾î¸¦ °á°ú°ªÀ¸·Î ¹Ù²Û´Ù.</p>
<p>element´Â ´ÙÀ½Áß Çϳª´Ù. ´ÙÀ½ ȸ¿¡ ´õ ÀÚ¼¼È÷ ¼³¸íÇÒ °ÍÀÌ´Ù.
Áö±ÝÀº SSI·Î ÇÒ ¼ö ÀÖ´Â ¸î°¡Áö ¿¹¸¦ º¸ÀδÙ</p>
<h3><a name="todaysdate" id="todaysdate">¿À´Ã ³¯Â¥</a></h3>
<div class="example"><p><code>
<!--#echo var="DATE_LOCAL" -->
</code></p></div>
<p><code>echo</code> element´Â º¯¼ö°ªÀ» ±×´ë·Î Ãâ·ÂÇÑ´Ù.
CGI ÇÁ·Î±×·¥¿¡ Á¦°øÇϴ ȯ°æº¯¼öµé ¿Ü¿¡µµ ¿©·¯ Ç¥ÁØ º¯¼ö°¡
ÀÖ´Ù. ¶Ç, <code>set</code> element¸¦ »ç¿ëÇÏ¿© Á÷Á¢ º¯¼ö¸¦
Á¤ÀÇÇÒ ¼öµµ ÀÖ´Ù.</p>
<p>³¯Â¥ Ãâ·Â Çü½ÄÀÌ ¸¶À½¿¡ µéÁö ¾Ê´Â´Ù¸é, ´ÙÀ½°ú °°ÀÌ
<code>config</code> elementÀÇ <code>timefmt</code> attribute¸¦
»ç¿ëÇÑ´Ù.</p>
<div class="example"><p><code>
<!--#config timefmt="%A %B %d, %Y" --><br />
Today is <!--#echo var="DATE_LOCAL" -->
</code></p></div>
<h3><a name="lastmodified" id="lastmodified">ÆÄÀÏÀÇ ¼öÁ¤ÀÏ</a></h3>
<div class="example"><p><code>
ÀÌ ¹®¼´Â <!--#flastmod file="index.html" -->¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú´Ù
</code></p></div>
<p>ÀÌ elementµµ <code>timefmt</code> Çü½Ä ¼³Á¤¿¡ ´Þ·È´Ù.</p>
<h3><a name="cgi" id="cgi">CGI ÇÁ·Î±×·¥ °á°ú¸¦ Æ÷ÇÔÇϱâ</a></h3>
<p>ÀϹÝÀûÀÎ SSI »ç¿ë¹ýÁß Çϳª·Î, ¸¹ÀÌµé ¾Ö¿ëÇÏ´Â ``¹æ¹®¼ö
Ä«¿îÅÍ'' °°Àº CGI ÇÁ·Î±×·¥ °á°ú¸¦ Ãâ·ÂÇÑ´Ù.</p>
<div class="example"><p><code>
<!--#include virtual="/cgi-bin/counter.pl" -->
</code></p></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="additionalexamples" id="additionalexamples">Ãß°¡ ¿¹Á¦</a></h2>
<p>´ÙÀ½Àº HTML ¹®¼¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â ¸î°¡Áö SSI ¿¹Á¦´Ù.</p>
<h3><a name="docmodified" id="docmodified">ÀÌ ¹®¼°¡ ¾ðÁ¦ ¸¶Áö¸·À¸·Î
¼öÁ¤µÇ¾ú³ª?</a></h3>
<p>¾Õ¿¡¼ SSI¸¦ »ç¿ëÇÏ¿© »ç¿ëÀÚ¿¡°Ô ¹®¼ÀÇ ÃÖ±Ù¼öÁ¤ÀÏÀ»
¾Ë¸± ¼ö ÀÖ´Ù°í ¸»Çß´Ù. ±×·¯³ª ½ÇÁ¦ ¹æ¹ýÀº ¾Ë·ÁÁÖÁö ¾Ê¾Ò´Ù.
´ÙÀ½ Äڵ带 HTML ¹®¼¿¡ »ç¿ëÇϸé ÆäÀÌÁö¿¡ ½Ã°£ ±â·ÏÀ» ³²±ä´Ù.
¹°·Ð À§¿¡¼ ¼³¸íÇÑ´ë·Î SSI°¡ ¿Ã¹Ù·Î ÀÛµ¿ÇØ¾ß ÇÑ´Ù.</p>
<div class="example"><p><code>
<!--#config timefmt="%A %B %d, %Y" --><br />
ÀÌ ¹®¼´Â <!--#flastmod file="ssi.shtml" -->¿¡ ¸¶Áö¸·À¸·Î ¼öÁ¤µÇ¾ú´Ù;
</code></p></div>
<p>¹°·Ð <code>ssi.shtml</code>´ë½Å ¿øÇÏ´Â ½ÇÁ¦ ÆÄÀϸíÀ»
»ç¿ëÇÑ´Ù. ¾Æ¹« ÆäÀÌÁö¿¡¶óµµ ºÙ¿©³ÖÀ» ¼ö ÀÖ´Â ¹ü¿ëÄڵ带
¿øÇÑ´Ù¸é, ÆÄÀÏ¸í ´ë½Å <code>LAST_MODIFIED</code> º¯¼ö¸¦
»ç¿ëÇÑ´Ù.</p>
<div class="example"><p><code>
<!--#config timefmt="%D" --><br />
This file last modified <!--#echo var="LAST_MODIFIED" -->
</code></p></div>
<p><code>timefmt</code> Çü½Ä¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ Á¤º¸´Â °Ë»ö¿£Áø¿¡¼
<code>strftime</code>À» ã¾ÆºÁ¶ó. ¹®¹ýÀº °°´Ù.</p>
<h3><a name="standard-footer" id="standard-footer">Ç¥ÁØ ÆäÀÌÁö ÇÏ´ÜÀ» Æ÷ÇÔÇϱâ</a></h3>
<p>¿©·¯ ÆäÀÌÁö°¡ ÀÖ´Â »çÀÌÆ®¸¦ °ü¸®ÇÑ´Ù¸é ÆäÀÌÁö Àüü¸¦
¼öÁ¤ÇÏ´Â °ÍÀº, ƯÈ÷ ÆäÀÌÁöµéÀÌ Ç¥ÁØ ¿Ü°üÀ» °¡Áöµµ·Ï ¼öÁ¤ÇÏ´Â
°ÍÀº Á¤¸»·Î ±«·Ó´Ù.</p>
<p>ÆäÀÌÁö »ó´Ü(header)°ú ÇÏ´Ü(footer)À» ÆÄÀÏ·Î Æ÷ÇÔÇÏ¿©
ÀÌ·± ¼öÁ¤ÀÇ ºÎ´ãÀ» ´ú ¼ö ÀÖ´Ù. ¸ðµç ÆäÀÌÁö¿¡¼
<code>include</code> SSI ¸í·É¾î¸¦ »ç¿ëÇÏ¿© ÆäÀÌÁö ÇÏ´Ü ÆÄÀÏ
Çϳª¸¦ Æ÷ÇÔÇÏ¸é µÈ´Ù. <code>include</code> elementÀÇ
<code>file</code> attribute³ª <code>virtual</code> attribute·Î
Æ÷ÇÔÇÒ ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù. <code>file</code> attribute´Â <em>ÇöÀç
µð·ºÅ丮¿¡ »ó´ëÀûÀÎ</em> ÆÄÀÏ°æ·Î´Ù. Áï, (/·Î ½ÃÀÛÇÏ´Â)
Àý´ëÆÄÀÏ°æ·Î³ª °æ·Î ¾È¿¡ ../¸¦ »ç¿ëÇÒ ¼ö ¾ø´Ù. ¾Æ¸¶µµ ¼ºñ½ºÇÏ´Â
¹®¼ÀÇ »ó´ë URLÀ» ÁöÁ¤ÇÒ ¼ö ÀÖ´Â <code>virtual</code> attribute°¡
´õ À¯¿ëÇÒ °ÍÀÌ´Ù. °æ·Î¸¦ /·Î ½ÃÀÛÇÒ ¼ö ÀÖÁö¸¸, Æ÷ÇÔÇÏ·Á´Â
ÆÄÀÏÀÌ ¼ºñ½ºÇÏ´Â ÆÄÀÏ°ú °°Àº ¼¹ö¿¡ ÀÖ¾î¾ß ÇÑ´Ù.</p>
<div class="example"><p><code>
<!--#include virtual="/footer.html" -->
</code></p></div>
<p>³ª´Â º¸Åë ÀÌ µÎ°¡Áö¸¦ ÇÕÃļ Æ÷ÇÔÇÒ ÆäÀÌÁö ÇÏ´Ü ÆÄÀÏ¿¡
<code>LAST_MODIFIED</code> Áö½Ã¾î¸¦ ³Ö´Â´Ù. Æ÷ÇÔÇÏ·Á´Â ÆÄÀÏ¿¡µµ
SSI Áö½Ã¾î°¡ ³ª¿Ã ¼ö ÀÖÀ¸¸ç, ÀÌ·¸°Ô Æ÷ÇÔÇÑ ÆÄÀÏÀÌ ´Ù¸¥ ÆÄÀÏÀ»
Æ÷ÇÔÇÏ´Â ½ÄÀ¸·Î ¿©·¯¹ø °è¼Ó Æ÷ÇÔÇÒ ¼öµµ ÀÖ´Ù.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="config" id="config">ÀÌ¿Ü¿¡ ¼³Á¤ÇÒ ¼ö ÀÖ´Â °ÍÀº?</a></h2>
<p>½Ã°£ Çü½Ä <code>config</code>(¼³Á¤) ¿Ü¿¡ µÎ°¡Áö¸¦ ´õ
<code>config</code>(¼³Á¤)ÇÒ ¼ö ÀÖ´Ù.</p>
<p>º¸Åë SSI Áö½Ã¾î°¡ À߸øµÇ¸é ´ÙÀ½°ú °°Àº ¹®±¸°¡ ³ª¿Â´Ù</p>
<div class="example"><p><code>
[an error occurred while processing this directive]
</code></p></div>
<p>ÀÌ ¹®±¸¸¦ º¯°æÇÏ°í ½Í´Ù¸é <code>config</code> elementÀÇ
<code>errmsg</code> attribute¸¦ »ç¿ëÇÏ¿© º¯°æÇÑ´Ù.</p>
<div class="example"><p><code>
<!--#config errmsg="[It appears that you don't know how to use SSI]" -->
</code></p></div>
<p>»çÀÌÆ®¸¦ ¼ºñ½ºÇϱâ Àü¿¡ ¸ðµç SSI Áö½Ã¾î ¹®Á¦¸¦ ÇØ°áÇÏ¿©
»ç¿ëÀÚ°¡ ÀÌ·± ¹®±¸¸¦ º¸Áö ¾Ê±æ ¹Ù¶õ´Ù. (±×·¸Áö?)</p>
<p>±×¸®°í <code>sizefmt</code> attribute°¡ ¹ÝȯÇÏ´Â ÆÄÀÏÅ©±â
Çü½ÄÀ» <code>config</code>(¼³Á¤)ÇÒ ¼ö ÀÖ´Ù. ¹ÙÀÌÆ®·Î Å©±â¸¦
º¸¿©ÁÖ·Á¸é <code>bytes</code>, ÀûÀýÈ÷ Kb³ª Mb·Î Å©±â¸¦
º¸¿©ÁÖ·Á¸é <code>abbrev</code>¸¦ »ç¿ëÇÑ´Ù.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="exec" id="exec">¸í·É¾î ½ÇÇàÇϱâ</a></h2>
<p>³ª´Â ´ÙÀ½ ´Þ¿¡ ÀÛÀº CGI ÇÁ·Î±×·¥°ú SSI¸¦ °°ÀÌ »ç¿ëÇÏ´Â
±ÛÀ» ¾µ ¿¹Á¤ÀÌ´Ù. Áö±ÝÀº <code>exec</code> element·Î ÇÒ
¼ö ÀÖ´Â ´Ù¸¥ °ÍµéÀ» ¼³¸íÇÒ °ÍÀÌ´Ù. SSI´Â ½ÇÁ¦ ½©À» (Á¤È®È÷´Â
<code>/bin/sh</code>³ª Win32¸¦ »ç¿ëÇÑ´Ù¸é DOS ½©) »ç¿ëÇÏ¿©
¸í·É¾î¸¦ ½ÇÇàÇÑ´Ù. ¿¹¸¦ µé¾î, ´ÙÀ½Àº µð·ºÅ丮 ¸ñ·ÏÀ» º¸¿©ÁØ´Ù.</p>
<div class="example"><p><code>
<pre><br />
<!--#exec cmd="ls" --><br />
</pre>
</code></p></div>
<p>or, on Windows</p>
<div class="example"><p><code>
<pre><br />
<!--#exec cmd="dir" --><br />
</pre>
</code></p></div>
<p><code>dir</code> Ãâ·Â¿¡ ºê¶ó¿ìÀú°¡ È¥µ¿ÇÒ
``<<code>dir</code>>'' ¹®ÀÚ¿ÀÌ Æ÷ÇÔµÇÀֱ⶧¹®¿¡,
À©µµ¿ìÁî¿¡¼ ÀÌ Áö½Ã¾î¸¦ »ç¿ëÇÏ¸é °á°ú°¡ Á¶±Ý ÀÌ»óÇÒ °ÍÀÌ´Ù.</p>
<p>ÀÌ ±â´ÉÀº <code>exec</code> ű׿¡ »ç¿ëÇÑ ¾î¶² ¸í·É¾î¶óµµ
½ÇÇàÇÒ ¼ö Àֱ⶧¹®¿¡ ¸Å¿ì À§ÇèÇÏ´Ù. ``¹æ¸í·Ï''°ú °°ÀÌ »ç¿ëÀÚ°¡
À¥ÆäÀÌÁö ³»¿ëÀ» ¼öÁ¤ÇÒ ¼ö Àִ ȯ°æÀ̶ó¸é, ÀÌ ±â´ÉÀ» Àý´ë·Î
»ç¿ëÇؼ± ¾ÈµÈ´Ù. <code>Options</code> Áö½Ã¾î¿¡
<code>IncludesNOEXEC</code> ¾Æ±Ô¸ÕÆ®¸¦ »ç¿ëÇÏ¿© SSI¸¦ Çã¿ëÇÏÁö¸¸
<code>exec</code> ±â´ÉÀ» ¸·À» ¼ö ÀÖ´Ù.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="advanced" id="advanced">°í±Þ SSI ±â¹ý</a></h2>
<p>³»¿ëÀ» Ãâ·ÂÇÏ´Â ±â´É ¿Ü¿¡ ¾ÆÆÄÄ¡ SSI´Â º¯¼ö ¼³Á¤ÀÌ °¡´ÉÇÏ°í,
ºñ±³¹®°ú Á¶°Ç¹®¿¡ ÀÌ º¯¼ö¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>
<h3><a name="caveat" id="caveat">°æ°í</a></h3>
<p>ÀÌ ±Û¿¡¼ ¼³¸íÇÏ´Â ´ëºÎºÐÀÇ ±â´ÉÀº ¾ÆÆÄÄ¡ 1.2 ÀÌÈĺÎÅÍ
»ç¿ëÇÒ ¼ö ÀÖ´Ù. ¹°·Ð, ¾ÆÆÄÄ¡ 1.2 ÀÌ»óÀ» »ç¿ëÇÏÁö ¾Ê´Â´Ù¸é
¾Æ¸¶µµ »¡¸® ¾÷±×·¹À̵åÇØ¾ß ÇÑ´Ù. Çضó. Áö±Ý Çضó. ±â´Ù¸±
°ÍÀÌ´Ù.</p>
<h3><a name="variables" id="variables">º¯¼ö ¼³Á¤</a></h3>
<p><code>set</code> Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© ³ªÁß¿¡ »ç¿ëÇÒ º¯¼ö¸¦
¼³Á¤ÇÒ ¼ö ÀÖ´Ù. ¾ÕÀ¸·Î º¯¼ö°¡ ÇÊ¿äÇϱ⶧¹®¿¡ ¸ÕÀú ¼³¸íÇÑ´Ù.
¹®¹ýÀº ´ÙÀ½°ú °°´Ù.</p>
<div class="example"><p><code>
<!--#set var="name" value="Rich" -->
</code></p></div>
<p>´ÙÀ½°ú °°ÀÌ °ªÀ» ¹®ÀÚ±×´ë·Î ¼³Á¤ÇÏÁö ¾Ê°í <a href="../env.html">ȯ°æº¯¼ö</a>³ª À§¿¡¼ ¼³¸íÇÑ º¯¼ö(¿¹¸¦
µé¾î, <code>LAST_MODIFIED</code>)¿Í °°ÀÌ ´Ù¸¥ º¯¼ö¸¦ »ç¿ëÇÏ¿©
º¯¼ö°ªÀ» ¼³Á¤ÇÒ ¼öµµ ÀÖ´Ù. À̶§ º¯¼ö¸í ¾Õ¿¡ ´Þ·¯ Ç¥½Ã($)¸¦
ºÙ¿©¼ ¹®ÀÚ¿ÀÌ ¾Æ´Ñ º¯¼öÀÓÀ» Ç¥½ÃÇÑ´Ù.</p>
<div class="example"><p><code> <!--#set var="modified" value="$LAST_MODIFIED" -->
</code></p></div>
<p>º¯¼ö°ª¿¡ ´Þ·¯ ¹®ÀÚ¸¦ ±×´ë·Î ÀÔ·ÂÇÏ·Á¸é ´Þ·¯ Ç¥½Ã ¾Õ¿¡
¹é½½·¡½¬¸¦ »ç¿ëÇÑ´Ù.</p>
<div class="example"><p><code>
<!--#set var="cost" value="\$100" -->
</code></p></div>
<p>¸¶Áö¸·À¸·Î ±ä ¹®ÀÚ¿ Áß°£¿¡ º¯¼ö¸¦ »ç¿ëÇϴµ¥ µÚ¿¡ ÀÖ´Â
¹®ÀÚµµ º¯¼ö¸íÀ¸·Î ¿ÀÀÎÇÏ¿© È¥µ¿µÇ´Â °æ¿ì, º¯¼ö¸íÀ» ´ë°ýÈ£·Î
¹¾î¼ È®½ÇÈ÷ ÇÑ´Ù. (ÁÁÀº ¿¹¸¦ ã±â ÈûµéÁö¸¸, ¹«½¼ ¸»ÀÎÁö
ÀÌÇØÇÏ±æ ¹Ù¶õ´Ù.)</p>
<div class="example"><p><code>
<!--#set var="date" value="${DATE_LOCAL}_${DATE_GMT}" -->
</code></p></div>
<h3><a name="conditional" id="conditional">Á¶°Ç Ç¥Çö½Ä</a></h3>
<p>º¯¼ö¸¦ ¼³Á¤ÇÏ°í ºñ±³ÇÒ ¼ö ÀÖÀ¸´Ï Á¶°Ç¹®ÀÌ °¡´ÉÇÏ´Ù. ÀÌÁ¦
SSI°¡ ÀÏÁ¾ÀÇ °£´ÜÇÑ ÇÁ·Î±×·¡¹Ö¾ð¾î°¡ µÈ´Ù.
<code class="module"><a href="../mod/mod_include.html">mod_include</a></code>´Â Á¶°Ç¹®À» ¸¸µå´Â <code>if</code>,
<code>elif</code>, <code>else</code>, <code>endif</code>
±¸Á¶¸¦ Á¦°øÇÑ´Ù. ½ÇÁ¦ ÇÑ ÆäÀÌÁö·Î ¿©·¯ ³í¸®ÀûÀÎ ÆäÀÌÁö¸¦
¸¸µé ¼ö ÀÖ´Ù.</p>
<p>Á¶°Ç¹® ±¸Á¶´Â ´ÙÀ½°ú °°´Ù.</p>
<div class="example"><p><code>
<!--#if expr="test_condition" --><br />
<!--#elif expr="test_condition" --><br />
<!--#else --><br />
<!--#endif -->
</code></p></div>
<p><em>test_condition</em>¿¡´Â ¾î¶² ³í¸®ºñ±³¶óµµ »ç¿ëÇÒ
¼ö ÀÖ´Ù. °ªÀ» ´Ù¸¥ °ª°ú ºñ±³Çϰųª, ƯÁ¤ °ªÀÌ ``Âü''ÀÎÁö
°Ë»çÇÑ´Ù. (¹®ÀÚ¿ÀÌ ºñ¾îÀÖÁö ¾ÊÀ¸¸é ÂüÀÌ´Ù.) »ç¿ë°¡´ÉÇÑ
ºñ±³ ¿¬»êÀÚ¸¦ ¸ðµÎ º¸·Á¸é, <code class="module"><a href="../mod/mod_include.html">mod_include</a></code>
¹®¼¸¦ Âü°íÇ϶ó. ´ÙÀ½Àº Á¶°Ç¹®À» »ç¿ëÇÑ ¸î°¡Áö ¿¹Á¦´Ù.</p>
<p>¼³Á¤ÆÄÀÏ¿¡ ´ÙÀ½ ÁÙÀ» Ãß°¡ÇÑ´Ù.</p>
<div class="example"><p><code>
BrowserMatchNoCase macintosh Mac<br />
BrowserMatchNoCase MSIE InternetExplorer
</code></p></div>
<p>Ŭ¶óÀ̾ðÆ®°¡ ¸ÆŲÅä½Ã¿¡¼ ½ÇÇàÇÏ´Â Internet Explorer¶ó¸é
ȯ°æº¯¼ö ``Mac''°ú ``InternetExplorer'' ¸ðµÎ ÂüÀ¸·Î ¼³Á¤ÇÑ´Ù.</p>
<p>±×¸®°í SSI ¹®¼¿¡ ´ÙÀ½°ú °°ÀÌ Àû´Â´Ù.</p>
<div class="example"><p><code>
<!--#if expr="${Mac} && ${InternetExplorer}" --><br />
¿©±â¿¡ »ç°ú¹®°¡ ³ª¿Â´Ù<br />
<!--#else --><br />
¿©±â¿¡ ¸ÚÁø JavaScript Äڵ尡 ³ª¿Â´Ù<br />
<!--#endif -->
</code></p></div>
<p>³»°¡ ¸ÅŲÅä½Ã IE¿¡ ¹Ý°¨ÀÌ ÀÖ´Â °ÍÀº ¾Æ´Ï´Ù. ³ª´Â ´ÜÁö
Àú¹øÁÖ¿¡ ´Ù¸¥ °÷¿¡¼´Â ¹®Á¦°¡ ¾ø´Â JavaScript Äڵ尡 ¸ÅŲÅä½Ã
IE¿¡¼´Â µ¿ÀÛÇÏÁö ¾Ê¾Æ¼ ¸î½Ã°£À» °í»ýÇß´Ù. À§´Â ÀÓ½Ã
ÇØ°áÃ¥ÀÌ´Ù.</p>
<p>(Á÷Á¢ Á¤ÀÇÇÏ¿´°Ç ÀÏ¹Ý È¯°æº¯¼öÀÌ°Ç) ¾î¶² º¯¼ö¶óµµ Á¶°Ç¹®¿¡
»ç¿ëÇÒ ¼ö ÀÖ´Ù. ¾Æ¶óÄ¡´Â <code>SetEnvIf</code>³ª ´Ù¸¥ °ü·Ã
Áö½Ã¾î·Î ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÒ ¼ö Àֱ⶧¹®¿¡ CGI ¾øÀ̵µ ¸ÚÁö°Ô
µ¿ÀûÀÎ ³»¿ëÀ» ¸¸µé ¼ö ÀÖ´Ù.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="conclusion" id="conclusion">°á·Ð</a></h2>
<p>SSI´Â È®½ÇÈ÷ CGI³ª µ¿ÀûÀÎ À¥ÆäÀÌÁö¸¦ »ý¼ºÇÏ´Â ´Ù¸¥ ±â¼úÀ»
´ëüÇÒ ¼ö ¾ø´Ù. ±×·¯³ª ¸¹Àº Ãß°¡ ÀÛ¾÷¾øÀÌ ÆäÀÌÁö¿¡ µ¿ÀûÀÎ
³»¿ëÀ» Á¶±Ý Ãß°¡Çϱ⿡´Â ÈǸ¢ÇÑ ¹æ¹ýÀÌ´Ù.</p>
</div></div>
<div class="bottomlang">
<p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/howto/ssi.html" hreflang="en" rel="alternate" title="English"> en </a> |
<a href="../fr/howto/ssi.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
<a href="../ja/howto/ssi.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/howto/ssi.html" title="Korean"> ko </a></p>
</div><div id="footer">
<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>
<p class="menu"><a href="../mod/">¸ðµâ</a> | <a href="../mod/directives.html">Áö½Ã¾îµé</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">¿ë¾î</a> | <a href="../sitemap.html">»çÀÌÆ®¸Ê</a></p></div>
</body></html>
|