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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
|
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="./style/manual.ko.xsl"?>
<!-- English Revision: 105989:290744 (outdated) -->
<!--
Copyright 2003-2005 The Apache Software Foundation or its licensors,
as applicable.
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.
-->
<manualpage metafile="sections.xml.meta">
<title>¼½¼Ç ¼³Á¤</title>
<summary> <p><a href="configuring.html">¼³Á¤ÆÄÀÏ</a>¿¡ ÀÖ´Â
Áö½Ã¾î´Â ¼¹ö Àüü¿¡ Àû¿ëµÇ°Å³ª, ƯÁ¤ µð·ºÅ丮, ÆÄÀÏ, È£½ºÆ®,
URL¿¡¸¸ Àû¿ëµÉ ¼ö ÀÖ´Ù. ÀÌ ¹®¼´Â ´Ù¸¥ Áö½Ã¾îÀÇ Àû¿ë¹üÀ§¸¦
Á¦ÇÑÇϱâÀ§ÇØ ¼³Á¤ ¼½¼ÇÀ̳ª <code>.htaccess</code> ÆÄÀÏÀ»
»ç¿ëÇÏ´Â ¹æ¹ýÀ» ¼³¸íÇÑ´Ù.</p>
</summary>
<section id="types"><title>¼³Á¤ ¼½¼ÇÀÇ Á¾·ù</title>
<related>
<modulelist>
<module>core</module>
<module>mod_proxy</module>
</modulelist>
<directivelist>
<directive type="section" module="core">Directory</directive>
<directive type="section" module="core">DirectoryMatch</directive>
<directive type="section" module="core">Files</directive>
<directive type="section" module="core">FilesMatch</directive>
<directive type="section" module="core">IfDefine</directive>
<directive type="section" module="core">IfModule</directive>
<directive type="section" module="core">Location</directive>
<directive type="section" module="core">LocationMatch</directive>
<directive type="section" module="mod_proxy">Proxy</directive>
<directive type="section" module="mod_proxy">ProxyMatch</directive>
<directive type="section" module="core">VirtualHost</directive>
</directivelist>
</related>
<p>¼½¼Ç¿¡´Â µÎ°¡Áö Á¾·ù°¡ ÀÖ´Ù. ´ëºÎºÐÀº ¸Å¿äû¸¶´Ù 󸮵ȴÙ.
ÇØ´çÇÏ´Â ¿äû¿¡¸¸ ¾È¿¡ Æ÷ÇÔÇÑ Áö½Ã¾î¸¦ Àû¿ëÇÑ´Ù. ¹Ý´ë·Î, <directive
type="section" module="core">IfDefine</directive>°ú <directive
type="section" module="core">IfModule</directive>Àº ¼¹ö°¡
½ÃÀÛÇÒ¶§¿Í ²¨Áú¶§¸¸ ó¸®ÇÑ´Ù. ½ÃÀÛÇÒ¶§ »óÅ°¡ ÂüÀÌ¸é ¾È¿¡ ÀÖ´Â
Áö½Ã¾î°¡ ¸ðµç ¿äû¿¡ Àû¿ëµÈ´Ù. ÂüÀÌ ¾Æ´Ï¸é ¾È¿¡ ÀÖ´Â Áö½Ã¾î´Â
¹«½ÃÇÑ´Ù.</p>
<p><directive type="section" module="core">IfDefine</directive>
Áö½Ã¾î´Â <code>httpd</code> ¸í·ÉÇà¿¡ ÀûÀýÇÑ ÆĶó¹ÌÅÍ°¡ ÀÖ´Â
°æ¿ì¿¡¸¸ ¾È¿¡ Æ÷ÇÔÇÑ Áö½Ã¾î¸¦ Àû¿ëÇÑ´Ù. ´ÙÀ½ ¼³Á¤À» ¿¹·Î µé¸é,
¼¹ö¸¦ <code>httpd -DClosedForNow</code>·Î ½ÃÀÛÇÒ °æ¿ì¿¡¸¸
¸ðµç ¿äûÀÌ ´Ù¸¥ »çÀÌÆ®·Î ¸®´ÙÀÌ·º¼ÇµÈ´Ù:</p>
<example>
<IfDefine ClosedForNow><br />
Redirect / http://otherserver.example.com/<br />
</IfDefine>
</example>
<p><directive type="section" module="core">IfModule</directive>
Áö½Ã¾îµµ ƯÁ¤ ¸ðµâÀÌ ¼¹ö¿¡ Æ÷ÇÔµÈ °æ¿ì¿¡¸¸ ¾È¿¡ µç Áö½Ã¾î¸¦
Àû¿ëÇÑ´Ù´Â Á¡À» Á¦¿ÜÇÏ°í´Â ¸Å¿ì ºñ½ÁÇÏ´Ù. ¸ðµâÀ» ¼¹ö¿¡ Á¤ÀûÀ¸·Î
ÄÄÆÄÀÏÇϰųª µ¿ÀûÀ¸·Î ÄÄÆÄÀÏÇÑÈÄ ¼³Á¤ÆÄÀÏ ¾Õ¿¡ <directive
module="mod_so">LoadModule</directive> ÁÙÀÌ ÀÖ¾î¾ß ÇÑ´Ù. ÀÌ
Áö½Ã¾î´Â ƯÁ¤ ¸ðµâÀÇ ¼³Ä¡À¯¹«¿¡ µû¶ó ¼³Á¤ÆÄÀÏÀÌ ´Ù¸¦ ÇÊ¿ä°¡
ÀÖÀ»¶§¸¸ »ç¿ëÇØ¾ß ÇÑ´Ù. ¸ðµâÀÌ ¾ø´Â °æ¿ì À¯¿ëÇÑ ¿À·ù¹®ÀÌ ³ª¿ÀÁö¾ÊÀ»
¼ö Àֱ⠶§¹®¿¡ ¾ðÁ¦³ª »ç¿ëÇÏ±æ ¿øÇÏ´Â Áö½Ã¾î¸¦ ¾È¿¡ µÎ¸é ¾ÈµÈ´Ù.</p>
<p>´ÙÀ½ ¿¹¿¡¼ <module>mod_mime_magic</module>ÀÌ ÀÖÀ»¶§¸¸ <directive
module="mod_mime_magic">MimeMagicFiles</directive> Áö½Ã¾î¸¦
ó¸®ÇÑ´Ù.</p>
<example>
<IfModule mod_mime_magic.c><br />
MimeMagicFile conf/magic<br />
</IfModule>
</example>
<p><directive type="section" module="core">IfDefine</directive>°ú
<directive type="section" module="core">IfModule</directive>ÀÇ
°Ë»ç ¾Õ¿¡ "!"À» ºÙ¿© Á¶°ÇÀ» ¿ªÀ¸·Î ÇÒ ¼ö ÀÖ´Ù. ¶Ç, ¿©·¯ ¼½¼ÇµéÀ»
°ãÃļ »ç¿ëÇÏ¿© ´õ º¹ÀâÇÑ È¿°ú¸¦ ¾òÀ» ¼ö ÀÖ´Ù.</p>
</section>
<section id="file-and-web"><title>ÆÄÀϽýºÅÛ°ú À¥°ø°£</title>
<p>°¡Àå ÀÚÁÖ »ç¿ëµÇ´Â ¼³Á¤ ¼½¼ÇÀº ÆÄÀϽýºÅÛ°ú À¥°ø°£(webspace)ÀÇ
ƯÁ¤ Àå¼Ò¿¡ ´ëÇÑ ¼³Á¤À» º¯°æÇÏ´Â °ÍµéÀÌ´Ù. ¸ÕÀú ÀÌ µÑÀÇ Â÷À̸¦
ÀÌÇØÇÏ´Â °ÍÀÌ Áß¿äÇÏ´Ù. ÆÄÀϽýºÅÛÀº ¿î¿µÃ¼Á¦ ÀÔÀå¿¡¼ µð½ºÅ©¸¦
º¸´Â °üÁ¡ÀÌ´Ù. ¿¹¸¦ µé¾î, ±âº»°ªÀ¸·Î ¾ÆÆÄÄ¡¸¦ ¼³Ä¡¸¦ Çϸé À¯´Ð½º
ÆÄÀϽýºÅÛÀÇ °æ¿ì <code>/usr/local/apache2</code>, À©µµ¿ìÁî
ÆÄÀϽýºÅÛÀÇ °æ¿ì <code>"c:/Program Files/Apache
Group/Apache2"</code>¿¡ ¼³Ä¡µÈ´Ù. (¾ÆÆÄÄ¡´Â À©µµ¿ìÁî¿¡¼ Á¶Â÷
Ç×»ó, ¿ª½½·¡½¬°¡ ¾Æ´Ñ, ½½·¡½¬¸¦ »ç¿ëÇÔÀ» ÁÖÀÇÇ϶ó.) ¹Ý´ë·Î
À¥°ø°£Àº À¥¼¹ö°¡ Á¦°øÇÏ°í Ŭ¶óÀ̾ðÆ®°¡ º¸°ÔµÉ »çÀÌÆ®ÀÇ °üÁ¡ÀÌ´Ù.
±×·¡¼ À¯´Ð½º¿¡¼ ±âº» ¾ÆÆÄÄ¡ ¼³Ä¡¸¦ ÇÑ °æ¿ì À¥°æ·ÎÀÇ °æ·Î
<code>/dir/</code>Àº ÆÄÀϽýºÅÛ °æ·Î
<code>/usr/local/apache2/htdocs/dir/</code>¿¡ ÇØ´çÇÑ´Ù. À¥°ø°£Àº
µ¥ÀÌŸº£À̽º µî¿¡¼ µ¿ÀûÀ¸·Î »ý¼ºµÉ ¼ö Àֱ⶧¹®¿¡ ¹Ýµå½Ã
ÆÄÀϽýºÅÛ¿¡ Á÷Á¢ ´ëÀÀµÉ ÇÊ¿ä´Â ¾ø´Ù.</p>
<section id="filesystem"><title>ÆÄÀϽýºÅÛ ¼½¼Ç</title>
<p><directive type="section" module="core">Directory</directive>¿Í
<directive type="section" module="core">Files</directive> Áö½Ã¾î¿Í
Á¤±ÔÇ¥Çö½ÄÀ» »ç¿ëÇÏ´Â Áö½Ã¾î´Â ÆÄÀϽýºÅÛÀÇ Æ¯Á¤ ºÎºÐ¿¡ Áö½Ã¾î¸¦
Àû¿ëÇÑ´Ù. <directive type="section"
module="core">Directory</directive> Áö½Ã¾î¿¡ Æ÷ÇÔµÈ Áö½Ã¾îµéÀº
ÁöÁ¤ÇÑ ÆÄÀϽýºÅÛ µð·ºÅ丮¿Í ±× ÇÏÀ§ µð·ºÅ丮¿¡ Àû¿ëµÈ´Ù. <a
href="howto/htaccess.html">.htaccess ÆÄÀÏ</a>À» »ç¿ëÇصµ °á°ú´Â
°°´Ù. ´ÙÀ½ ¼³Á¤À» ¿¹·Î µé¸é, µð·ºÅ丮 ¸ñ·Ï(index)ÀÌ
<code>/var/web/dir1</code> ÀÌÇÏ µð·ºÅ丮¿¡¼ µð·ºÅ丮 ¸ñ·Ï(index)ÀÌ
°¡´ÉÇÏ´Ù.</p>
<example>
<Directory /var/web/dir1><br />
Options +Indexes<br />
</Directory>
</example>
<p><directive type="section"
module="core">Files</directive> ¼½¼Ç¿¡ Æ÷ÇÔµÈ Áö½Ã¾îµéÀº ¾î¶²
µð·ºÅ丮¿¡ ÀÖ´ÂÁö °ü°è¾øÀÌ ÁöÁ¤ÇÑ À̸§À» °¡Áø ÆÄÀÏ¿¡ Àû¿ëµÈ´Ù.
¼³Á¤ÆÄÀÏÀÇ ÁÖ¼³Á¤ºÎºÐ¿¡ ÀÖ´Â ´ÙÀ½ ¼³Á¤À» ¿¹·Î µé¸é, Àå¼Ò¿Í
°ü°è¾øÀÌ <code>private.html</code>À̶õ À̸§À» ÇÑ ÆÄÀÏÀÇ Á¢±ÙÀ»
°ÅºÎÇÑ´Ù.</p>
<example>
<Files private.html><br />
Order allow,deny<br />
Deny from all<br />
</Files>
</example>
<p>ÆÄÀϽýºÅÛÀÇ Æ¯Á¤ ºÎºÐ¿¡ ÀÖ´Â ÆÄÀÏÀ» ÁöĪÇϱâÀ§ÇØ <directive
type="section" module="core">Files</directive>¿Í <directive
type="section" module="core">Directory</directive> ¼½¼ÇÀ» °°ÀÌ
»ç¿ëÇÑ´Ù. ´ÙÀ½ ¼³Á¤À» ¿¹·Î µé¸é,
<code>/var/web/dir1/private.html</code>,
<code>/var/web/dir1/subdir2/private.html</code>,
<code>/var/web/dir1/subdir3/private.html</code> °°ÀÌ
<code>/var/web/dir1/</code> µð·ºÅ丮 ¾Æ·¡¿¡ ÀÖ´Â À̸§ÀÌ
<code>private.html</code>ÀÎ ÆÄÀÏÀÇ Á¢±ÙÀ» °ÅºÎÇÑ´Ù.</p>
<example>
<Directory /var/web/dir1><br />
<Files private.html><br />
Order allow,deny<br />
Deny from all<br />
</Files><br />
</Directory>
</example>
</section>
<section id="webspace"><title>À¥°ø°£ ¼½¼Ç</title>
<p><directive type="section" module="core">Location</directive>
Áö½Ã¾î¿Í ÀÌ¿¡ ÇØ´çÇÏ´Â Á¤±ÔÇ¥Çö½ÄÀ» »ç¿ëÇÏ´Â Áö½Ã¾î´Â ¹Ý´ë·Î
ƯÁ¤ À¥°ø°£ÀÇ ¼³Á¤À» ¹Ù²Û´Ù. ´ÙÀ½ ¼³Á¤À» ¿¹·Î µé¸é, /privateÀ¸·Î
½ÃÀÛÇÏ´Â URL-°æ·ÎÀÇ Á¢±ÙÀÌ °ÅºÎµÈ´Ù. ¿©±â¿¡´Â
<code>http://yoursite.example.com/private</code>,
<code>http://yoursite.example.com/private123</code>,
<code>http://yoursite.example.com/private/dir/file.html</code>
°°ÀÌ <code>/private</code> ¹®ÀÚ¿·Î ½ÃÀÛÇÏ´Â ¿äûÀÌ ÇØ´çµÈ´Ù.</p>
<example>
<Location /private><br />
Order Allow,Deny<br />
Deny from all<br />
</Location>
</example>
<p><directive type="section" module="core">Location</directive>
Áö½Ã¾î´Â ÆÄÀϽýºÅÛ¿¡ ´ëÀÀÇÒ ÇÊ¿ä°¡ ¾ø´Ù. ´ÙÀ½ ¿¹´Â ¾î¶»°Ô ƯÁ¤
URLÀ» <module>mod_status</module>°¡ Á¦°øÇÏ´Â ¾ÆÆÄÄ¡ ³»ºÎ Çڵ鷯·Î
´ëÀÀ½ÃÅ°´ÂÁö¸¦ º¸¿©ÁØ´Ù. ÆÄÀϽýºÅÛ¿¡ <code>server-status</code>¶ó´Â
ÆÄÀÏÀº ÇÊ¿ä¾ø´Ù.</p>
<example>
<Location /server-status><br />
SetHandler server-status<br />
</Location>
</example>
</section>
<section id="wildcards"><title>¿ÍÀϵåÄ«µå¿Í Á¤±ÔÇ¥Çö½Ä</title>
<p><directive type="section" module="core">Directory</directive>,
<directive type="section" module="core">Files</directive>,
<directive type="section" module="core">Location</directive>
Áö½Ã¾î¿¡¼ C Ç¥ÁØ ÆÄÀ̺귯¸®ÀÇ <code>fnmatch</code>¿Í °°Àº
½©¿¡¼ »ç¿ëÇÏ´Â ¿ÍÀϵåÄ«µå ¹®ÀÚ¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.
"*" ¹®ÀÚ´Â ¾î¶² ¹®ÀÚ¿ÀÌ¶óµµ ³ªÅ¸³»°í, "?" ¹®ÀÚ´Â ¾î¶² ¹®ÀÚ ÇÑ°³¸¦
³ªÅ¸³»¸ç, "[<em>seq</em>]"´Â <em>seq</em> Áß¿¡ ÇÑ ¹®ÀÚ¸¦ ³ªÅ¸³½´Ù.
¾î¶² ¿ÍÀϵåÄ«µåµµ "/" ¹®ÀÚ¸¦ ³ªÅ¸³»Áö´Â ¸øÇÑ´Ù. ±×·¡¼ ÀÌ ¹®ÀÚ´Â
Á÷Á¢ »ç¿ëÇØ¾ß ÇÑ´Ù.</p>
<p>´õ À¯¿¬ÇÑ ¼³Á¤ÀÌ ÇÊ¿äÇϸé perlȣȯ <a
href="glossary.html#regex">Á¤±ÔÇ¥Çö½Ä</a>À» »ç¿ëÇÏ´Â <directive
type="section" module="core">DirectoryMatch</directive>, <directive
type="section" module="core">FilesMatch</directive>, <directive
type="section" module="core">LocationMatch</directive>¸¦ »ç¿ëÇÒ
¼ö ÀÖ´Ù. ±×·¯³ª ¾Æ·¡ ¼³Á¤ÀÇ °áÇÕ¿¡ °üÇÑ Àý¿¡¼ Á¤±ÔÇ¥Çö½Ä ¼½¼ÇÀ»
»ç¿ëÇϸé Áö½Ã¾î°¡ Àû¿ëµÇ´Â ¹æ¹ýÀÌ ¾î¶»°Ô º¯ÇÏ´ÂÁö »ìÆìºÁ¶ó.</p>
<p>¸ðµç »ç¿ëÀÚ µð·ºÅ丮 ¼³Á¤À» º¯°æÇÏ´Â ºñÁ¤±ÔÇ¥Çö½Ä ¿ÍÀϵåÄ«µå
¼½¼ÇÀº ´ÙÀ½°ú °°´Ù:</p>
<example>
<Directory /home/*/public_html><br />
Options Indexes<br />
</Directory>
</example>
<p>Á¤±ÔÇ¥Çö½Ä ¼½¼ÇÀ» »ç¿ëÇÏ¿© Çѹø¿¡ ¿©·¯ Á¾·ùÀÇ ±×¸²ÆÄÀÏ¿¡
´ëÇÑ Á¢±ÙÀ» °ÅºÎÇÒ ¼ö ÀÖ´Ù:</p>
<example>
<FilesMatch \.(?i:gif|jpe?g|png)$><br />
Order allow,deny<br />
Deny from all<br />
</FilesMatch>
</example>
</section>
<section id="whichwhen"><title>¹«¾ùÀ» »ç¿ëÇϳª</title>
<p>ÆÄÀϽýºÅÛ ¼½¼Ç°ú À¥°ø°£ ¼½¼Ç Áß Çϳª¸¦ ¼±ÅÃÇÏ´Â °ÍÀº ½ÇÁ¦·Î
¸Å¿ì ½±´Ù. ÆÄÀϽýºÅÛ¿¡ ÀÖ´Â °´Ã¼¿¡ Áö½Ã¾î¸¦ Àû¿ëÇÒ¶§´Â Ç×»ó
<directive type="section" module="core">Directory</directive>³ª
<directive type="section" module="core">Files</directive>¸¦
»ç¿ëÇÑ´Ù. (µ¥ÀÌŸº£À̽º¿¡¼ »ý¼ºÇÑ À¥ÆäÀÌÁö¿Í °°ÀÌ) ÆÄÀϽýºÅÛ¿¡
ÀÖÁö ¾Ê´Â °´Ã¼¿¡ Áö½Ã¾î¸¦ Àû¿ëÇÒ¶§´Â <directive type="section"
module="core">Location</directive>À» »ç¿ëÇÑ´Ù.</p>
<p>ÆÄÀϽýºÅÛ¿¡ ÀÖ´Â °´Ã¼ÀÇ Á¢±ÙÀ» Á¦ÇÑÇϱâÀ§ÇØ <directive
type="section" module="core">Location</directive>À» »ç¿ëÇϸé
Àý´ë ¾ÈµÈ´Ù. ¿©·¯ ´Ù¸¥ À¥°ø°£ Àå¼Ò(URL)°¡ °°Àº ÆÄÀϽýºÅÛ Àå¼Ò¿¡
´ëÀÀµÉ ¼ö ÀÖÀ¸¹Ç·Î, °É¾îµÐ Á¦ÇÑÀ» ¿ìȸÇÒ ¼ö Àֱ⠶§¹®ÀÌ´Ù. ´ÙÀ½
¼³Á¤ÀÇ ¿¹¸¦ »ìÆ캸ÀÚ:</p>
<example>
<Location /dir/><br />
Order allow,deny<br />
Deny from all<br />
</Location>
</example>
<p>ÀÌ ¼³Á¤Àº <code>http://yoursite.example.com/dir/</code>À»
¿äûÇÑ´Ù¸é Àß ÀÛµ¿ÇÑ´Ù. ±×·¯³ª ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏÁö¾Ê´Â ÆÄÀϽýºÅÛÀ»
»ç¿ëÇÑ´Ù¸é ¾î¶»°ÔµÇ³ª?
<code>http://yoursite.example.com/DIR/</code>À» ¿äûÇÏ¿© ½±°Ô
Á¦ÇÑÀ» ¿ìȸÇÒ ¼ö ÀÖ´Ù. ¹Ý´ë·Î <directive type="section"
module="core">Directory</directive> Áö½Ã¾î´Â ¾î¶»°Ô ¿äûÇÏ¿´´ÂÁö
°ü°è¾øÀÌ ±× Àå¼Ò¿¡¼ ¼ºñ½ºµÇ´Â ³»¿ë¿¡ Àû¿ëµÈ´Ù. (¿¹¿Ü´Â ÆÄÀϽýºÅÛ
¸µÅ©¸¦ »ç¿ëÇÏ´Â °æ¿ì´Ù. ½Éº¼¸µÅ©¸¦ »ç¿ëÇÏ¿© ÇÑ µð·ºÅ丮¸¦
ÆÄÀϽýºÅÛÀÇ ¿©·¯ Àå¼Ò¿¡ µÑ ¼ö ÀÖ´Ù. <directive type="section"
module="core">Directory</directive> Áö½Ã¾î´Â ½Éº¼¸µÅ©¸¦ µû¶ó°£´Ù.
±×·¯¹Ç·Î ³ôÀº ¼öÁØÀÇ º¸¾ÈÀ» À§Çؼ´Â ÀûÀýÇÑ <directive
module="core">Options</directive> Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© ½Éº¼¸µÅ©¸¦
¹«½ÃÇØ¾ß ÇÑ´Ù.)</p>
<p>¾Æ¸¶µµ ´ç½ÅÀº ´ë¼Ò¹®ÀÚ¸¦ ±¸º°ÇÏ´Â ÆÄÀϽýºÅÛÀ» »ç¿ëÇϹǷÎ
ÀÌ·± ÀÏÀÌ ÀϾÁö ¾Ê´Â´Ù°í »ý°¢ÇÒÁöµµ ¸ð¸¥´Ù. ±×·¯³ª ´Ù¸¥
¹æ¹ýÀ¸·Îµµ ¿©·¯ À¥°ø°£ À§Ä¡°¡ ÇÑ ÆÄÀϽýºÅÛ À§Ä¡¿¡ ´ëÀÀµÉ ¼ö
ÀÖÀ½À» ±â¾ïÇ϶ó. ±×·¡¼ °¡´ÉÇϸé Ç×»ó ÆÄÀϽýºÅÛ ¼½¼ÇÀ» »ç¿ëÇؾß
ÇÑ´Ù. ±×·¯³ª ÀÌ ±ÔÄ¢¿¡ ¿¹¿Ü°¡ Çϳª ÀÖ´Ù. ¼³Á¤ Á¦ÇÑÀ»
<code><Location /></code> ¼½¼Ç¿¡ µÎ¸é ÀÌ ¼½¼ÇÀÌ Æ¯Á¤
URLÀÌ ¾Æ´Ñ ¸ðµç ¿äû¿¡ Àû¿ëµÇ¹Ç·Î ¿Ïº®ÇÏ°Ô ¾ÈÀüÇÏ´Ù.</p>
</section>
</section>
<section id="virtualhost"><title>°¡»óÈ£½ºÆ®</title>
<p><directive type="section" module="core">VirtualHost</directive>
¼½¼ÇÀº ƯÁ¤ È£½ºÆ®¿¡ Àû¿ëµÇ´Â Áö½Ã¾îµéÀ» Æ÷ÇÔÇÑ´Ù. ÀÌ´Â ÇÑ
ÄÄÇ»ÅÍ¿¡¼ °¢°¢ ´Ù¸¥ ¼³Á¤À» »ç¿ëÇÑ ¿©·¯ È£½ºÆ®¸¦ ¼ºñ½ºÇÒ¶§
À¯¿ëÇÏ´Ù. ´õ ÀÚ¼¼ÇÑ Á¤º¸´Â <a href="vhosts/">°¡»óÈ£½ºÆ® ¹®¼</a>¸¦
Âü°íÇ϶ó.</p>
</section>
<section id="proxy"><title>ÇÁ·Ï½Ã</title>
<p><directive type="section" module="mod_proxy">Proxy</directive>¿Í
<directive type="section" module="mod_proxy">ProxyMatch</directive>
¼½¼ÇÀº ÁöÁ¤ÇÑ URL¿¡ ´ëÇØ <module>mod_proxy</module> ÇÁ·Ï½Ã ¼¹ö¸¦
°ÅÃÄ Á¢±ÙÇÏ´Â °æ¿ì¿¡¸¸ Àû¿ëµÈ´Ù. ´ÙÀ½ ¼³Á¤À» ¿¹·Î µé¸é, ÇÁ·Ï½Ã
¼¹ö¸¦ ÅëÇØ <code>cnn.com</code> À¥»çÀÌÆ®¿¡ Á¢±ÙÇÒ ¼ö ¾ø´Ù.</p>
<example>
<Proxy http://cnn.com/*><br />
Order allow,deny<br />
Deny from all<br />
</Proxy>
</example>
</section>
<section id="whatwhere"><title>¾È¿¡ ¾î¶² Áö½Ã¾î¸¦ »ç¿ëÇÒ ¼ö
ÀÖ³ª?</title>
<p>¾î¶² ¼³Á¤ ¼½¼Ç¾È¿¡ »ç¿ëÇÒ ¼ö ÀÖ´Â Áö½Ã¾î¸¦ ¾Ë·Á¸é Áö½Ã¾îÀÇ
<a href="mod/directive-dict.html#Context">»ç¿ëÀå¼Ò</a>¸¦ È®ÀÎÇ϶ó.
<directive type="section" module="core">Directory</directive>¿¡¼
»ç¿ë°¡´ÉÇÑ Áö½Ã¾î´Â <directive type="section"
module="core">DirectoryMatch</directive>, <directive type="section"
module="core">Files</directive>, <directive type="section"
module="core">FilesMatch</directive>, <directive type="section"
module="core">Location</directive>, <directive type="section"
module="core">LocationMatch</directive>, <directive type="section"
module="mod_proxy">Proxy</directive>, <directive type="section"
module="mod_proxy">ProxyMatch</directive> ¼½¼Ç¿¡¼µµ »ç¿ë°¡´ÉÇÏ´Ù.
±×·¯³ª, ¿¹¿Ü°¡ ÀÖ´Ù:</p>
<ul>
<li><directive module="core">AllowOverride</directive> Áö½Ã¾î´Â
<directive type="section" module="core">Directory</directive>
¼½¼Ç¿¡¼¸¸ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</li>
<li><code>FollowSymLinks</code>, <code>SymLinksIfOwnerMatch</code>,
<directive module="core">Options</directive>´Â <directive
type="section" module="core">Directory</directive> ¼½¼ÇÀ̳ª
<code>.htaccess</code> ÆÄÀÏ¿¡¼¸¸ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</li>
<li><directive module="core">Options</directive> Áö½Ã¾î´Â
<directive type="section" module="core">Files</directive>°ú
<directive type="section" module="core">FilesMatch</directive>
¼½¼Ç¿¡¼ »ç¿ëÇÒ ¼ö ¾ø´Ù.</li>
</ul>
</section>
<section id="mergin"><title>¼½¼ÇµéÀÌ °áÇÕÇÏ´Â ¹æ¹ý</title>
<p>¼³Á¤ ¼½¼ÇÀº ¸Å¿ì Ưº°ÇÑ ¹æ¹ýÀ¸·Î Àû¿ëµÈ´Ù. ÀÌ ¼ø¼°¡ ¼³Á¤
Áö½Ã¾î¸¦ Çؼ®ÇÏ´Â ¹æ¹ý¿¡ Áß¿äÇÑ ¿µÇâÀ» Áֱ⶧¹®¿¡ ÀÌ ¹æ¹ýÀ»
ÀÌÇØÇÏ´Â °ÍÀÌ Áß¿äÇÏ´Ù.</p>
<p>°áÇÕÇÏ´Â ¼ø¼´Â:</p>
<ol>
<li> (Á¤±ÔÇ¥Çö½ÄÀ» »ç¿ëÇÏÁö¾Ê´Â) <directive type="section"
module="core">Directory</directive>¿Í <code>.htaccess</code>´Â
µ¿½Ã¿¡ ÀϾ٠(°æ¿ì¿¡ µû¶ó <code>.htaccess</code>ÀÌ
<directive type="section" module="core">Directory</directive>¸¦
¹«½ÃÇϵµ·Ï ¼³Á¤ÇÒ ¼ö ÀÖ´Ù)</li>
<li><directive type="section"
module="core">DirectoryMatch</directive> (±×¸®°í
<code><Directory ~></code>)</li>
<li><directive type="section"
module="core">Files</directive>¿Í <directive type="section"
module="core">FilesMatch</directive>´Â µ¿½Ã¿¡ ÀϾÙ</li>
<li><directive type="section"
module="core">Location</directive>°ú <directive type="section"
module="core">LocationMatch</directive>´Â µ¿½Ã¿¡ ÀϾÙ</li>
</ol>
<p><directive type="section"
module="core">Directory</directive>¸¦ Á¦¿ÜÇÏ°í °¢ ¼½¼ÇµéÀ»
¼³Á¤ÆÄÀÏ¿¡ ³ª¿Â ¼ø¼´ë·Î 󸮵ȴÙ. (À§ÀÇ ¼ø¼ 1) <directive
type="section" module="core">Directory</directive>´Â µð·ºÅ丮
³»¿ëÀÌ °¡Àå ªÀº °Í¿¡¼ ±äÂÊÀ¸·Î 󸮵ȴÙ. ±×·¡¼ ¿¹¸¦ µé¾î,
<code><Directory /var/web/dir></code>À»
<code><Directory /var/web/dir/subdir></code> ÀÌÀü¿¡
ó¸®ÇÑ´Ù. °°Àº µð·ºÅ丮¸¦ ÁöĪÇÏ´Â ¿©·¯ <directive
type="section" module="core">Directory</directive> ¼½¼ÇÀÌ
ÀÖ´Ù¸é À̵éÀ» ¼³Á¤ÆÄÀÏ ¼ø¼´ë·Î ó¸®ÇÑ´Ù. <directive
module="core">Include</directive> Áö½Ã¾î·Î Æ÷ÇÔÇÑ ¼³Á¤Àº
<directive module="core">Include</directive> Áö½Ã¾î À§Ä¡¿¡
Æ÷ÇÔÇÑ ÆÄÀÏ ³»¿ëÀÌ ÀÖ´Â °Íó·³ ó¸®ÇÑ´Ù.</p>
<p><directive type="section"
module="core">VirtualHost</directive> ¼½¼Ç ¾È¿¡ Æ÷ÇÔµÈ ¼½¼ÇÀº
°¡»óÈ£½ºÆ® Á¤ÀÇ ¹Û¿¡ ÀÖ´Â ÇØ´ç ¼½¼Ç <em>ÀÌÈÄ¿¡</em> Àû¿ëµÈ´Ù.
±×·¡¼ °¡»óÈ£½ºÆ® ¾È¿¡¼ ÁÖ¼¹öÀÇ ¼³Á¤»çÇ×À» ¼öÁ¤ÇÒ ¼ö ÀÖ´Ù.</p>
<p><module>mod_proxy</module>°¡ ¿äû ¼ºñ½ºÇÒ¶§, <directive
module="mod_proxy" type="section">Proxy</directive> ¼½¼ÇÀÇ
󸮼ø¼´Â <directive module="core"
type="section">Directory</directive> ¼½¼Ç°ú °°´Ù.</p>
<p>´ÙÀ½¿¡ ³ª¿À´Â ¼½¼ÇÀº ÀÌÀü ¼½¼ÇÀÇ °á°ú¸¦ ¼öÁ¤ÇÑ´Ù.</p>
<note><title>±â¼úÀû ÁÖÀÇ</title>
½ÇÁ¦·Î
<code><Location></code>/<code><LocationMatch></code>´Â
(<code>Aliases</code>¿Í <code>DocumentRoot</code>¸¦ »ç¿ëÇÏ¿©
URLÀ» ÆÄÀϸíÀ¸·Î º¯È¯ÇÏ´Â) À̸§¹ø¿ª ´Ü°è ÀÌÀü¿¡ 󸮵ȴÙ.
º¯¿ªÀÌ ³¡³ ÀÌÈÄ¿¡´Â ¿ÏÀüÈ÷ ¹«½ÃÇÑ´Ù.
</note>
<section id="merge-examples"><title>¿¹Á¦</title>
<p>´ÙÀ½Àº °ãÇÕÇÏ´Â ¼ø¼¸¦ ¼³¸íÇÏ´Â ¿¹´Ù. ÀÌµé ¸ðµÎ ¿äû¿¡
Àû¿ëµÈ´Ù°í °¡Á¤Çϸé Áö½Ã¾î´Â A > B > C > D > E
¼ø¼·Î 󸮵ȴÙ.</p>
<example>
<Location /><br />
E<br />
</Location><br />
<br />
<Files f.html><br />
D<br />
</Files><br />
<br />
<VirtualHost *><br />
<Directory /a/b><br />
B<br />
</Directory><br />
</VirtualHost><br />
<br />
<DirectoryMatch "^.*b$"><br />
C<br />
</DirectoryMatch><br />
<br />
<Directory /a/b><br />
A<br />
</Directory><br />
<br />
</example>
<p>´õ Çö½ÇÀûÀÎ ¿¹´Â ´ÙÀ½°ú °°´Ù. <directive module="core"
type="section">Location</directive> ¼½¼ÇÀ» ³ªÁß¿¡ ó¸®ÇϹǷÎ
<directive module="core" type="section">Directory</directive>
¼½¼Ç¿¡ ÀÖ´Â Á¢±ÙÁ¦ÇÑ°ú °ü°è¾øÀÌ ¼¹ö¿¡ ¹«Á¦ÇÑ Á¢±ÙÀ» °¡´ÉÇÏ´Ù.
Áï, °áÇÕÇÏ´Â ¼ø¼´Â Áß¿äÇϹǷΠÁÖÀÇÇ϶ó!</p>
<example>
<Location /><br />
Order deny,allow<br />
Allow from all<br />
</Location><br />
<br />
# ¾Ç! ÀÌ <Directory> ¼½¼ÇÀº ¾Æ¹«·± È¿°ú°¡ ¾ø´Ù<br />
<Directory /><br />
Order allow,deny<br />
Allow from all<br />
Deny from badguy.example.com<br />
</Directory>
</example>
</section>
</section>
</manualpage>
|