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
|
<?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:106803 (outdated) -->
<!--
Copyright 2002-2004 The Apache Software Foundation
Licensed 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_log_config.xml.meta">
<name>mod_log_config</name>
<description>¼¹ö·ÎÀÇ ¿äûÀ» ·Î±×¿¡ ±â·ÏÇÑ´Ù</description>
<status>Base</status>
<sourcefile>mod_log_config.c</sourcefile>
<identifier>log_config_module</identifier>
<summary>
<p>ÀÌ ¸ðµâÀº Ŭ¶óÀ̾ðÆ®ÀÇ ¿äûÀ» ·Î±×¿¡ ÀÚÀ¯·Ó°Ô ±â·ÏÇÑ´Ù.
ÀÚ½ÅÀÌ ¿øÇÏ´Â Çü½ÄÀ¸·Î ·Î±×¸¦ ±â·ÏÇÒ ¼ö ÀÖ°í, ÆÄÀÏÀ̳ª ¿ÜºÎ
ÇÁ·Î±×·¥¿¡ Á÷Á¢ ·Î±×¸¦ º¸³¾ ¼öµµ ÀÖ´Ù. Á¶°ÇÀû ·Î±×¸¦ »ç¿ëÇϸé
¿äûÀÇ ¼º°Ý¿¡ µû¶ó ¿äûÀ» ·Î±×¿¡ Ãß°¡Çϰųª Á¦¿ÜÇÒ ¼ö ÀÖ´Ù.</p>
<p>ÀÌ ¸ðµâÀº ¼¼°¡Áö Áö½Ã¾î¸¦ Á¦°øÇÑ´Ù. <directive
module="mod_log_config">TransferLog</directive>´Â ·Î±×ÆÄÀÏÀ»
¸¸µé°í, <directive module="mod_log_config">LogFormat</directive>Àº
¿øÇÏ´Â Çü½ÄÀ» Á¤ÇÏ°í, <directive
module="mod_log_config">CustomLog</directive>´Â Çѹø¿¡ ·Î±×ÆÄÀÏ°ú
Çü½ÄÀ» ¸ðµÎ ÁöÁ¤ÇÑ´Ù. <directive>TransferLog</directive>¿Í
<directive>CustomLog</directive> Áö½Ã¾î¸¦ ¿©·¯¹ø »ç¿ëÇϸé
¿äûÀ» ¿©·¯ ÆÄÀÏ¿¡ ±â·ÏÇÒ ¼ö ÀÖ´Ù.</p>
</summary>
<seealso><a href="../logs.html">¾ÆÆÄÄ¡ ·Î±×ÆÄÀÏ</a></seealso>
<section id="formats"><title>·Î±× Çü½Ä ÁöÁ¤Çϱâ</title>
<p><directive module="mod_log_config">LogFormat</directive>°ú
<directive module="mod_log_config">CustomLog</directive>
Áö½Ã¾îÀÇ Çü½Ä ¾Æ±Ô¸ÕÆ®´Â ¹®ÀÚ¿ÀÌ´Ù. ÀÌ ¹®ÀÚ¿¿¡ µû¶ó ¿äûÀ»
·Î±×ÆÄÀÏ¿¡ ±â·ÏÇÑ´Ù. ¹®ÀÚ¿¿¡´Â ·Î±×ÆÄÀÏ¿¡ ±×´ë·Î º¹»çµÇ´Â
¹®ÀÚ¿Í Çà¹Ù²Þ°ú ÅÇÀ» ³ªÅ¸³»´Â CÀÇ "\n"°ú "\t" Á¦¾î¹®ÀÚ¸¦
»ç¿ëÇÒ ¼ö ÀÖ´Ù. ·Î±×ÆÄÀÏ¿¡ µû¿ÈÇ¥³ª ¹é½½·¡½¬¸¦ ¾²·Á¸é ¾Õ¿¡
¹Ýµå½Ã ¹é½½·¡½¬¸¦ Àû¾îÁà¾ß ÇÑ´Ù.</p>
<p>¿äûÀÇ Æ¯Â¡Àº Çü½Ä ¹®ÀÚ¿¿¡ "<code>%</code>" Áö½Ã¾î¸¦
»ç¿ëÇÏ¿© ±â·ÏÇÑ´Ù. ÀÌ Áö½Ã¾î´Â ·Î±×ÆÄÀÏ¿¡¼ ´ÙÀ½°ú °°ÀÌ
º¯°æµÈ´Ù.</p>
<table border="1" style="zebra">
<columnspec><column width=".2"/><column width=".8"/></columnspec>
<tr><th>Çü½Ä ¹®ÀÚ¿</th>
<th>¼³¸í</th></tr>
<tr><td><code>%%</code></td>
<td>ÆÛ¼¾Æ® ±âÈ£</td></tr>
<tr><td><code>%...a</code></td>
<td>¿ø°Ý IP-ÁÖ¼Ò</td></tr>
<tr><td><code>%...A</code></td>
<td>(¼¹ö) IP-ÁÖ¼Ò</td></tr>
<tr><td><code>%...B</code></td>
<td>HTTP Çì´õ¸¦ Á¦¿ÜÇÑ Àü¼Û ¹ÙÀÌÆ®¼ö.</td></tr>
<tr><td><code>%...b</code></td>
<td>HTTP Çì´õ¸¦ Á¦¿ÜÇÑ Àü¼Û ¹ÙÀÌÆ®¼ö. CLF Çü½Ä°ú °°ÀÌ
Àü¼ÛÇÑ ³»¿ëÀÌ ¾ø´Â °æ¿ì 0 ´ë½Å '<code>-</code>'°¡ ³ª¿Â´Ù.</td></tr>
<tr><td><code>%...{<var>Foobar</var>}C</code></td>
<td>¼¹ö°¡ ¼ö½ÅÇÑ ¿äû¿¡¼ <var>Foobar</var> ÄíÅ°ÀÇ
³»¿ë.</td></tr>
<tr><td><code>%...D</code></td>
<td>¿äûÀ» ó¸®Çϴµ¥ °É¸° ½Ã°£ (¸¶ÀÌÅ©·ÎÃÊ ´ÜÀ§).</td></tr>
<tr><td><code>%...{<var>FOOBAR</var>}e</code></td>
<td>ȯ°æº¯¼ö <var>FOOBAR</var>ÀÇ ³»¿ë</td></tr>
<tr><td><code>%...f</code></td>
<td>ÆÄÀϸí</td></tr>
<tr><td><code>%...h</code></td>
<td>¿ø°Ý È£½ºÆ®</td></tr>
<tr><td><code>%...H</code></td>
<td>¿äû ÇÁ·ÎÅäÄÝ</td></tr>
<tr><td><code>%...{<var>Foobar</var>}i</code></td>
<td>¼¹ö°¡ ¼ö½ÅÇÑ ¿äû¿¡¼ <code><var>Foobar</var>:</code>
Çì´õÀÇ ³»¿ë.</td></tr>
<tr><td><code>%...l</code></td>
<td>(ÀÖ´Ù¸é identd°¡ Á¦°øÇÑ) ¿ø°Ý ·Î±×Àθí.
<module>mod_ident</module>°¡ ÀÖ°í <directive
module="mod_ident">IdentityCheck</directive>°¡
<code>On</code>ÀÌ ¾Æ´Ï¸é »©±â±âÈ£¸¦ ±â·ÏÇÑ´Ù.</td></tr>
<tr><td><code>%...m</code></td>
<td>¿äû ¸Þ½áµå</td></tr>
<tr><td><code>%...{<var>Foobar</var>}n</code></td>
<td>´Ù¸¥ ¸ðµâÀÌ ±â·ÏÇÑ <var>Foobar</var> ³ëÆ®(note)
³»¿ë.</td></tr>
<tr><td><code>%...{<var>Foobar</var>}o</code></td>
<td>ÀÀ´äÀÇ <code><var>Foobar</var>:</code> Çì´õ ³»¿ë.</td></tr>
<tr><td><code>%...p</code></td>
<td>¿äûÀ» ¼ºñ½ºÇÏ´Â ¼¹öÀÇ Á¤±Ô Æ÷Æ®</td></tr>
<tr><td><code>%...P</code></td>
<td>¿äûÀ» ¼ºñ½ºÇÏ´Â ÀÚ½ÄÀÇ ÇÁ·Î¼¼½º ID.</td></tr>
<tr><td><code>%...{<var>format</var>}P</code></td>
<td>¿äûÀ» ¼ºñ½ºÇÏ´Â ÀÚ½ÄÀÇ ÇÁ·Î¼¼½º ID ȤÀº ¾²·¹µå
ID. format¿¡´Â <code>pid</code>¿Í <code>tid</code>°¡
°¡´ÉÇÏ´Ù.
</td></tr>
<tr><td><code>%...q</code></td>
<td>ÁúÀǹ®ÀÚ¿ (ÁúÀǹ®ÀÚ¿ÀÌ ÀÖ´Ù¸é ¾Õ¿¡ <code>?</code>¸¦
ºÙÀÌ°í, ¾ø´Ù¸é ºó ¹®ÀÚ¿)</td></tr>
<tr><td><code>%...r</code></td>
<td>¿äûÀÇ Ã¹¹ø° ÁÙ</td></tr>
<tr><td><code>%...s</code></td>
<td>»óÅÂ(status). ³»ºÎ ¸®´ÙÀÌ·º¼ÇµÈ ¿äûÀÇ °æ¿ì *¿ø·¡*
¿äûÀÇ »óÅÂÀÌ´Ù. ÃÖÁ¾ ¿äûÀÇ »óÅ´ <code>%...>s</code>.</td></tr>
<tr><td><code>%...t</code></td>
<td>common log format ½Ã°£ Çü½Ä(Ç¥ÁØ ¿µ¾î Çü½Ä)ÀÇ ½Ã°£</td></tr>
<tr><td><code>%...{<var>format</var>}t</code></td>
<td><code>strftime(3)</code> Çü½Ä formatÀÇ ½Ã°£. (Áö¿ª½Ã°£ÀÏ
¼ö ÀÖÀ½)</td></tr>
<tr><td><code>%...T</code></td>
<td>¿äûÀ» ó¸®Çϴµ¥ °É¸° ½Ã°£ (ÃÊ ´ÜÀ§).</td></tr>
<tr><td><code>%...u</code></td>
<td>¿ø°Ý »ç¿ëÀÚ (auth°¡ Á¦°øÇϸç, »óÅÂ(<code>%s</code>)°¡
401ÀÎ °æ¿ì ÀÌ»óÇÑ °ªÀ» ³ª¿Ã ¼ö ÀÖÀ½)</td></tr>
<tr><td><code>%...U</code></td>
<td>ÁúÀǹ®ÀÚ¿À» Á¦¿ÜÇÑ ¿äû URL °æ·Î.</td></tr>
<tr><td><code>%...v</code></td>
<td>¿äûÀ» ¼ºñ½ºÇÑ ¼¹öÀÇ Á¤±Ô <directive
module="core">ServerName</directive>.</td></tr>
<tr><td><code>%...V</code></td>
<td><directive module="core">UseCanonicalName</directive>
¼³Á¤¿¡ µû¸¥ ¼¹ö¸í.</td></tr>
<tr><td><code>%...X</code></td>
<td>ÀÀ´äÀ» ¸¶ÃÆÀ»¶§ ¿¬°á »óÅÂ.
<table>
<columnspec><column width=".2"/><column width=".6"/></columnspec>
<tr><td><code>X</code> =</td>
<td>ÀÀ´äÀ» ¸¶Ä¡±â Àü¿¡ ¿¬°áÀÌ ²÷¾îÁ³´Ù.</td></tr>
<tr><td><code>+</code> =</td>
<td>ÀÀ´äÀ» º¸³½ÈÄ¿¡µµ ¿¬°áÀÌ »ì¾ÆÀÖ´Ù(keep alive).</td></tr>
<tr><td><code>-</code> = </td>
<td>ÀÀ´äÀ» º¸³½ÈÄ ¿¬°áÀÌ ²÷¾îÁ³´Ù.</td></tr>
</table>
<p>(¾ÆÆÄÄ¡ 1.3 ÈÄ¹Ý ¹öÀü¿¡¼ ÀÌ Áö½Ã¾î´Â
<code>%...c</code>¿´Áö¸¸, ÀüÅëÀûÀÎ ssl
<code>%...{<var>var</var>}c</code> ¹®¹ý°ú °ãÃļ
º¯°æÇß´Ù.)</p></td></tr>
<tr><td><code>%...I</code></td>
<td>¿äû°ú Çì´õ¸¦ Æ÷ÇÔÇÑ ¼ö½Å ¹ÙÀÌÆ®¼ö·Î 0ÀÏ ¼ö ¾ø´Ù.
À̸¦ »ç¿ëÇÏ·Á¸é <module>mod_logio</module>°¡ ÇÊ¿äÇÏ´Ù.</td></tr>
<tr><td><code>%...O</code></td>
<td>Çì´õ¸¦ Æ÷ÇÔÇÑ ¼Û½Å ¹ÙÀÌÆ®¼ö·Î 0ÀÏ ¼ö ¾ø´Ù. À̸¦
»ç¿ëÇÏ·Á¸é <module>mod_logio</module>°¡ ÇÊ¿äÇÏ´Ù.</td></tr>
</table>
<p>"<var>...</var>"¿¡´Â (<em>¿¹¸¦ µé¾î</em>,
<code>"%h %u %r %s %b"</code>) ¾Æ¹«°Íµµ ¾ø°Å³ª, Ç׸ñÀ» Æ÷ÇÔÇÒ
Á¶°ÇÀÌ ³ª¿Â´Ù (Á¶°ÇÀ» ¸¸Á·ÇÏÁö ¾ÊÀ¸¸é ÀÚ¸®¿¡ "-"¸¦ ±â·ÏÇÑ´Ù).
Á¶°ÇÀº ¾Õ¿¡ "!"¸¦ ºÙÀ̰ųª ¾ÈºÙÀÎ HTTP »óÅÂÄÚµå ¸ñ·ÏÀ¸·Î
ÀÛ¼ºÇÑ´Ù. ¿¹¸¦ µé¾î, "%400,501{User-agent}i"´Â 400 (Bad
Request) ¿À·ù¿Í 501 (Not Implemented) ¿À·ùÀ϶§¸¸
<code>User-agent:</code>¸¦ ·Î±×¿¡ ³²±â°í,
"%!200,304,302{Referer}i"´Â Á¤»óÀûÀÎ »óÅ°¡ <em>¾Æ´Ñ</em>
¸ðµç ¿äû¿¡ ´ëÇØ <code>Referer:</code>¸¦ ·Î±×¿¡ ³²±ä´Ù.</p>
<p>¼öÁ¤ÀÚ "<"¿Í ">"´Â ³»ºÎ ¸®´ÙÀÌ·º¼ÇµÈ ¿äû¿¡¼ °¢°¢
óÀ½ ¿äûÀ» ¸»ÇÒÁö ¸¶Áö¸· ¿äûÀ» ¸»ÇÒÁö ¼±ÅÃÇÑ´Ù. ±âº»ÀûÀ¸·Î
<code>%s, %U, %T, %D, %r</code>Àº óÀ½ ¿äûÀ» º¸°í, ³ª¸ÓÁö
<code>%</code> Áö½Ã¾î´Â ¸¶Áö¸· ¿äûÀ» º»´Ù. ±×·¡¼
<code>%>s</code>´Â ¿äûÀÇ ¸¶Áö¸· »óÅÂ(status)¸¦ ±â·ÏÇÏ°í,
<code>%<u</code>´Â ÀÎÁõÀ¸·Î º¸È£ÇÏÁö ¾Ê´Â ÀÚ¿øÀ¸·Î ³»ºÎ
¶ó´ÙÀÌ·º¼ÇµÈ °æ¿ì¿¡µµ óÀ½¿¡ ÀÎÁõÇÑ »ç¿ëÀÚ¸¦ ±â·ÏÇÑ´Ù.</p>
<p>2.0.46 ÀÌÀüÀÇ httpd 2.0 ¹öÀüÀº <code>%...r</code>,
<code>%...i</code>, <code>%...o</code>ÀÇ °á°ú ¹®ÀÚ¿À» ±×´ë·Î
µÎ¾ú´Ù. ÀÌÀ¯´Â Common Log FormatÀÇ ¿ä±¸»çÇ×À» µû¸£±âÀ§Çؼ¿´´Ù.
Áï, Ŭ¶óÀ̾ðÆ®°¡ Á¦¾î¹®ÀÚ¸¦ ·Î±×¿¡ Áý¾î³ÖÀ» ¼ö Àֱ⶧¹®¿¡
·Î±×ÆÄÀÏÀ» ±×´ë·Î ´Ù·ê ¶§´Â Á¶½ÉÇØ¾ß ÇÑ´Ù.</p>
<p>º¸¾È»ó ÀÌÀ¯·Î 2.0.46ºÎÅÍ Ãâ·ÂÇÒ ¼ö ¾ø´Â ¹®ÀÚ³ª ´Ù¸¥ Ư¼ö¹®ÀÚ¸¦
<code>\x<var>hh</var></code>·Î Ç¥ÇöÇÑ´Ù. ¿©±â¼ <var>hh</var>´Â
ÇØ´ç ¹ÙÀÌÆ®ÀÇ 16Áø¼ö Ç¥ÇöÀ» ³ªÅ¸³½´Ù. ÀÌ ±ÔÄ¢ÀÇ ¿¹¿Ü´Â ¹é½½·¡½¬¸¦
¾Õ¿¡ ºÙÀÌ´Â <code>"</code>¿Í <code>\</code>, ±×¸®°í C¾ð¾î
Çü½ÄÀÇ °ø¹é¹®ÀÚµé(<code>\n</code>, <code>\t</code> µî)ÀÌ´Ù.</p>
<p>ÀϹÝÀûÀ¸·Î ¸¹ÀÌ »ç¿ëÇÏ´Â ·Î±× Çü½ÄÀº ´ÙÀ½°ú °°´Ù.</p>
<dl>
<dt>Common Log Format (CLF)</dt>
<dd><code>"%h %l %u %t \"%r\" %>s %b"</code></dd>
<dt>°¡»óÈ£½ºÆ® Á¤º¸¸¦ Æ÷ÇÔÇÑ Common Log Format</dt>
<dd><code>"%v %h %l %u %t \"%r\" %>s %b"</code></dd>
<dt>NCSA extended/combined ·Î±× Çü½Ä</dt>
<dd><code>"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-agent}i\""</code></dd>
<dt>Referer ·Î±× Çü½Ä</dt>
<dd><code>"%{Referer}i -> %U"</code></dd>
<dt>Agent (ºê¶ó¿ìÀú) ·Î±× Çü½Ä</dt>
<dd><code>"%{User-agent}i"</code></dd>
</dl>
<p>¿äûÀ» ¼ºñ½ºÇÏ´Â ¼¹öÀÇ Á¤±Ô <directive
module="core">ServerName</directive>°ú <directive
module="mpm_common">Listen</directive>Àº °¢°¢ <code>%v</code>¿Í
<code>%p</code>¸¦ »ç¿ëÇÑ´Ù. ·Î±×ºÐ¼® ÇÁ·Î±×·¥ÀÌ ½ÇÁ¦·Î ¿äûÀ»
¼ºñ½ºÇϴ ȣ½ºÆ®¸¦ ¾Ë±âÀ§ÇØ °¡»óÈ£½ºÆ® ã±â ¾Ë°í¸®ÁòÀ»
°¡Áú ÇÊ¿ä¾øµµ·Ï ÀÌµé °ªÀº <directive
module="core">UseCanonicalName</directive> ¼³Á¤°ú ¹«°üÇÏ´Ù.</p>
</section>
<section id="security"><title>º¸¾È»ó °í·ÁÇÒ Á¡</title>
<p>¼¹ö¸¦ ½ÃÀÛÇÏ´Â »ç¿ëÀÚ¿Ü¿¡ ´Ù¸¥ »ç¿ëÀÚ°¡ ·Î±×ÆÄÀÏÀ» ÀúÀåÇÏ´Â
µð·ºÅ丮¿¡ ¾²±â ±ÇÇÑÀ» °¡Áú¶§ ¿Ö º¸¾È¿¡ ¹®Á¦°¡ »ý±â´ÂÁö
<a href="../misc/security_tips.html#serverroot">º¸¾È ÆÁ</a>
¹®¼¸¦ Âü°íÇ϶ó.</p>
</section>
<directivesynopsis>
<name>CookieLog</name>
<description>ÄíÅ°¸¦ ·Î±×¿¡ ³²±â±âÀ§ÇØ »ç¿ëÇÒ ÆÄÀϸíÀ» ¼³Á¤ÇÑ´Ù</description>
<syntax>CookieLog <var>filename</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<compatibility>ÀÌ Áö½Ã¾î´Â »ç¿ëµÇÁö ¾Ê´Â´Ù.</compatibility>
<usage>
<p><directive>CookieLog</directive> Áö½Ã¾î´Â ÄíÅ°¸¦ ·Î±×¿¡
³²±â±âÀ§ÇØ »ç¿ëÇÒ ÆÄÀϸíÀ» ¼³Á¤ÇÑ´Ù. ÆÄÀϸíÀº <directive
module="core">ServerRoot</directive>¿¡ »ó´ë°æ·ÎÀÌ´Ù. ÀÌ
Áö½Ã¾î´Â <code>mod_cookies</code>¿Í ȣȯÀ» À§ÇØ Æ÷ÇÔÇßÀ»»Ó,
½ÇÁ¦ »ç¿ëµÇÁö ¾Ê´Â´Ù.</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>CustomLog</name>
<description>·Î±×ÆÄÀÏ À̸§°ú Çü½ÄÀ» ÁöÁ¤ÇÑ´Ù</description>
<syntax>CustomLog <var>file</var>|<var>pipe</var>
<var>format</var>|<var>nickname</var>
[env=[!]<var>environment-variable</var>]</syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage>
<p>¼¹ö°¡ ¿äûÀ» ·Î±×¿¡ ³²±æ¶§ <directive>CustomLog</directive>
Áö½Ã¾î¸¦ »ç¿ëÇÑ´Ù. ·Î±× Çü½ÄÀ» ÁöÁ¤ÇÏ°í, ȯ°æº¯¼ö¸¦ »ç¿ëÇÏ¿©
¿äûÀÇ Æ¯Â¡¿¡ µû¶ó ¼±ÅÃÀûÀ¸·Î ·Î±×¸¦ ³²±æ ¼öµµ ÀÖ´Ù.</p>
<p>·Î±×¸¦ ±â·ÏÇÒ Àå¼Ò¸¦ ÁöÁ¤Çϴ ù¹ø° ¾Æ±Ô¸ÕÆ®¿¡´Â ´ÙÀ½
µÑÁß Çϳª¸¦ »ç¿ëÇÑ´Ù.</p>
<dl>
<dt><var>file</var></dt>
<dd><directive module="core">ServerRoot</directive>¿¡
»ó´ëÀûÀÎ ÆÄÀϸí.</dd>
<dt><var>pipe</var></dt>
<dd>ÆÄÀÌÇÁ¹®ÀÚ "<code>|</code>"µÚ¿¡ ·Î±× Á¤º¸¸¦ Ç¥ÁØÀÔ·ÂÀ¸·Î
¹ÞÀ» ÇÁ·Î±×·¥ °æ·Î¸¦ Àû´Â´Ù.
<note type="warning"><title>º¸¾È:</title>
<p>ÇÁ·Î±×·¥À» »ç¿ëÇÑ´Ù¸é ÇÁ·Î±×·¥Àº À¥¼¹ö¸¦ ½ÃÀÛÇÑ »ç¿ëÀÚ
±ÇÇÑÀ¸·Î ½ÇÇàµÈ´Ù. ¼¹ö¸¦ root·Î ½ÃÀÛÇÑ´Ù¸é ÇÁ·Î±×·¥µµ
root·Î ½ÇÇàÇϹǷΠÇÁ·Î±×·¥ÀÌ ¾ÈÀüÇÑÁö È®ÀÎÇ϶ó.</p>
</note>
<note type="warning"><title>ÁÖÀÇ</title>
<p>À¯´Ð½º°¡ ¾Æ´Ñ Ç÷¡Æû¿¡¼ ÆÄÀÏ°æ·Î¸¦ ÀÔ·ÂÇÒ¶§ Ç÷¡ÆûÀÌ
¹é½½·¡½¬¸¦ »ç¿ëÇÏ´õ¶óµµ ¹Ýµå½Ã ½½·¡½¬¸¦ »ç¿ëÇØ¾ß ÇÑ´Ù.
ÀϹÝÀûÀ¸·Î ¼³Á¤ÆÄÀÏ¿¡¼´Â Ç×»ó ½½·¡½¬¸¦ »ç¿ëÇÏ´Â °ÍÀÌ
ÁÁ´Ù.</p>
</note></dd>
</dl>
<p>µÎ¹ø° ¾Æ±Ô¸ÕÆ®´Â ·Î±×ÆÄÀÏ¿¡ ±â·ÏÇÒ ³»¿ëÀ» ÁöÁ¤ÇÑ´Ù.
Àü¿¡ <directive module="mod_log_config">LogFormat</directive>À¸·Î
Á¤ÀÇÇÑ <var>nickname</var>À» »ç¿ëÇϰųª Á÷Á¢ <a
href="#formats">·Î±× Çü½Ä</a> Àý¿¡¼ ¼³¸íÇÑ <var>format</var>
¹®ÀÚ¿À» »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>
<p>¿¹¸¦ µé¾î, ´ÙÀ½ µÎ Áö½Ã¾î´Â ¶È°°Àº ÀÏÀ» ÇÑ´Ù.</p>
<example>
# Çü½Ä º°ÄªÀ» »ç¿ëÇÑ CustomLog<br />
LogFormat "%h %l %u %t \"%r\" %>s %b" common<br />
CustomLog logs/access_log common<br />
<br />
# Á÷Á¢ Çü½Ä ¹®ÀÚ¿À» »ç¿ëÇÑ CustomLog<br />
CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b"
</example>
<p>¼¼¹ø° ¾Æ±Ô¸ÕÆ®´Â ¾ø¾îµµ µÇ¸ç, ƯÁ¤ ¼¹ö ȯ°æº¯¼ö À¯¹«¿¡
µû¶ó ¿äûÀ» ·Î±×¿¡ ±â·ÏÇÒÁö ¿©ºÎ¸¦ °áÁ¤ÇÑ´Ù. ¿äû¿¡ ÁöÁ¤ÇÑ
<a href="../env.html">ȯ°æº¯¼ö</a>°¡ Á¤ÀǵÇÀÖ´Ù¸é (ȤÀº
'<code>env=!<var>name</var></code>'¸¦ »ç¿ëÇÑ °æ¿ì ¾ø´Ù¸é)
¿äûÀ» ·Î±×¿¡ ±â·ÏÇÑ´Ù.</p>
<p><module>mod_setenvif</module>³ª <module>mod_rewrite</module>
¸ðµâÀ» »ç¿ëÇÏ¿© ¿äûº°·Î ȯ°æº¯¼ö¸¦ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù. ¿¹¸¦
µé¾î, ¼¹ö°¡ GIF ±×¸²¿¡ ´ëÇÑ ¸ðµç ¿äûÀ» ÁÖ¼¹ö ·Î±×°¡ ¾Æ´Ñ
´Ù¸¥ ·Î±×ÆÄÀÏ¿¡ ±â·ÏÇÏ·Á¸é,</p>
<example>
SetEnvIf Request_URI \.gif$ gif-image<br />
CustomLog gif-requests.log common env=gif-image<br />
CustomLog nongif-requests.log common env=!gif-image
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>LogFormat</name>
<description>·Î±×ÆÄÀÏ¿¡ »ç¿ëÇÒ Çü½ÄÀ» ±â¼úÇÑ´Ù</description>
<syntax>LogFormat <var>format</var>|<var>nickname</var>
[<var>nickname</var>]</syntax>
<default>LogFormat "%h %l %u %t \"%r\" %>s %b"</default>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage>
<p>ÀÌ Áö½Ã¾î´Â Á¢±Ù ·Î±×ÆÄÀÏÀÇ Çü½ÄÀ» ÁöÁ¤ÇÑ´Ù.</p>
<p><directive>LogFormat</directive> Áö½Ã¾î´Â µÎ°¡Áö Çü½ÄÀ¸·Î
»ç¿ëÇÑ´Ù. ù¹ø° Çü½ÄÀº ¾Æ±Ô¸ÕÆ®¸¦ ÇÑ°³¸¸ »ç¿ëÇÏ¿© ´ÙÀ½
<directive>TransferLog</directive> Áö½Ã¾îµéÀÌ »ç¿ëÇÒ ·Î±×
Çü½ÄÀ» ÁöÁ¤ÇÑ´Ù. ÀÌ ¾Æ±Ô¸ÕÆ®¿¡ À§ÀÇ <a href="#formats">·Î±×
Çü½Ä ÁöÁ¤Çϱâ</a> Àý¿¡¼ ¼³¸íÇÑ <var>format</var>À» Á÷Á¢
»ç¿ëÇϰųª, ´ÙÀ½¿¡ ¼³¸íÇÒ <directive>LogFormat</directive>
Áö½Ã¾î·Î ¹Ì¸® Á¤ÀÇÇÑ (·Î±× Çü½ÄÀ» ÁöĪÇÏ´Â) <var>nickname</var>À»
»ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>
<p><directive>LogFormat</directive> Áö½Ã¾îÀÇ µÎ¹ø° Çü½ÄÀº
<var>format</var>°ú <var>nickname</var>À» ¿¬°áÇÑ´Ù. ±×·¯¸é
µÚ¿¡¼ »ç¿ëÇÏ´Â <directive>LogFormat</directive>À̳ª <directive
module="mod_log_config">CustomLog</directive> Áö½Ã¾î¿¡ ¹Ýº¹Çؼ
Çü½Ä ¹®ÀÚ¿À» ¸ðµÎ ÀÔ·ÂÇÏ´Â ´ë½Å <var>nickname</var>À» »ç¿ëÇÒ
¼ö ÀÖ´Ù. º°ÄªÀ» Á¤ÀÇÇÏ´Â <directive>LogFormat</directive>
Áö½Ã¾î´Â <strong>ÀÌ ¿Ü¿¡´Â ¾Æ¹« ±â´ÉÀ» ÇÏÁö ¾Ê´Â´Ù</strong>.
Áï, º°Äª<em>¸¸</em>À» Á¤ÀÇÇϸç, ½ÇÁ¦·Î Çü½ÄÀ» Àû¿ëÇϰųª
Çü½ÄÀ» ±âº»°ªÀ¸·Î ¸¸µéÁö ¾Ê´Â´Ù. ±×·¯¹Ç·Î ´ÙÀ½¿¡ ³ª¿À´Â
<directive module="mod_log_config">TransferLog</directive>
Áö½Ã¾î¿¡ ¿µÇâÀ» ÁÖÁö ¾Ê´Â´Ù. ¶Ç,
<directive>LogFormat</directive>Àº º°ÄªÀ¸·Î ´Ù¸¥ º°ÄªÀ»
Á¤ÀÇÇÒ ¼ö ÀÖ´Ù. º°Äª À̸§¿¡´Â ÆÛ¼¾Æ® ±âÈ£(<code>%</code>)¸¦
»ç¿ëÇÒ ¼ö ¾øÀ½À» ÁÖÀÇÇ϶ó.</p>
<example><title>¿¹Á¦</title>
LogFormat "%v %h %l %u %t \"%r\" %>s %b" vhost_common
</example>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>TransferLog</name>
<description>·Î±×ÆÄÀÏ À§Ä¡¸¦ ¼³Á¤ÇÑ´Ù</description>
<syntax>TransferLog <var>file</var>|<var>pipe</var></syntax>
<contextlist><context>server config</context><context>virtual host</context>
</contextlist>
<usage>
<p>ÀÌ Áö½Ã¾î´Â <directive
module="mod_log_config">CustomLog</directive> Áö½Ã¾î¿Í ¾Æ±Ô¸ÕÆ®¿Í
±â´ÉÀÌ ºñ½ÁÇÏÁö¸¸, ·Î±× Çü½ÄÀ» Á÷Á¢ ÁöÁ¤Çϰųª ¿äûÀ» Á¶°Ç¿¡
µû¶ó ·Î±×¿¡ ³²±æ ¼ö ¾ø´Ù. ´ë½Å °¡Àå ÃÖ±Ù »ç¿ëÇÑ (º°ÄªÀ»
Á¤ÀÇÇÏÁö ¾ÊÀº) <directive
module="mod_log_config">LogFormat</directive> Áö½Ã¾î°¡ ÁöÁ¤ÇÑ
·Î±× Çü½ÄÀ» »ç¿ëÇÑ´Ù. ¹Ì¸® Çü½ÄÀ» ÁöÁ¤ÇÏÁö ¾Ê¾Ò´Ù¸é Common
Log FormatÀ» »ç¿ëÇÑ´Ù.</p>
<example><title>¿¹Á¦</title>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""<br />
TransferLog logs/access_log
</example>
</usage>
</directivesynopsis>
</modulesynopsis>
|