summaryrefslogtreecommitdiff
path: root/docs/manual/vhosts/examples.html.ko.euc-kr
blob: a5b9d7765b29cf0e04c95f0f57ee1acd247a3447 (plain)
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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
<?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>
<meta content="text/html; charset=EUC-KR" http-equiv="Content-Type" />
<!--
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
              This file is generated from xml source: DO NOT EDIT
        XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      -->
<title>°¡»óÈ£½ºÆ® ¿¹ - 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" /><link href="http://httpd.apache.org/docs/current/vhosts/examples.html" rel="canonical" /></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.0</p>
<img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.0</a> &gt; <a href="./">°¡»óÈ£½ºÆ®</a></div><div id="page-content"><div class="retired"><h4>Please note</h4>
            <p>This document refers to the <strong>2.0</strong> version of Apache httpd, which <strong>is no longer maintained</strong>. Upgrade, and refer to the current version of httpd instead, documented at:</p>
        <ul><li><a href="http://httpd.apache.org/docs/current/">Current release version of Apache HTTP Server documentation</a></li></ul><p>You may follow <a href="http://httpd.apache.org/docs/current/vhosts/examples.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>°¡»óÈ£½ºÆ® ¿¹</h1>
<div class="toplang">
<p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../ko/vhosts/examples.html" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
</div>
<div class="outofdate">ÀÌ ¹®¼­´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù.
            ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼­¸¦ Âü°íÇϼ¼¿ä.</div>


    <p>ÀÌ ¹®¼­´Â ÀÚÁÖ ¹®ÀǵǴ °¡»óÈ£½ºÆ®
    Áú¹®¿¡ ´äÀ» ÇÏ·Á°í ¾²¿©Á³´Ù. »óȲÀº <a href="name-based.html">À̸§±â¹Ý</a>À̳ª <a href="ip-based.html">IP±â¹Ý</a> °¡»óÈ£½ºÆ®¸¦ ÅëÇØ ÇÑ ¼­¹ö¿¡¼­
    ¿©·¯ À¥»çÀÌÆ®¸¦ ¼­ºñ½ºÇÏ·Á´Â °æ¿ìÀÌ´Ù. ÇÑ ÇÁ·Ï½Ã ¼­¹ö µÚ¿¡¼­
    ¿©·¯ ¼­¹ö¸¦ »ç¿ëÇÏ¿© »çÀÌÆ®¸¦ ¿î¿µÇÏ´Â °æ¿ì¸¦ ´Ù·é ¹®¼­µµ
    °ð ³ª¿Ã °ÍÀÌ´Ù.</p>

</div>
<div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#purename">IP ÁÖ¼Ò ÇÑ°³¿¡ ¿©·¯ À̸§±â¹Ý
    À¥»çÀÌÆ® ¿î¿µÇϱâ.</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#twoips">¿©·¯ IP ÁÖ¼Ò¿¡¼­ À̸§±â¹Ý
    È£½ºÆ®.</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#intraextra">(³»ºÎ¿Í ¿ÜºÎ ÁÖ¼Ò¿Í °°ÀÌ)
    ´Ù¸¥ IP ÁÖ¼Ò·Î °°Àº ³»¿ëÀ» ¼­ºñ½ºÇϱâ.</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#port">¿©·¯ Æ÷Æ®¿¡¼­ ¼­·Î ´Ù¸¥ »çÀÌÆ®
    ¿î¿µÇϱâ.</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#ip">IP±â¹Ý °¡»óÈ£½ºÆ®</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#ipport">Æ÷Æ®±â¹Ý°ú ip±â¹ÝÀÌ È¥ÇÕµÈ
    °¡»óÈ£½ºÆ®</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#mixed">À̸§±â¹Ý°ú IP±â¹ÝÀÌ È¥ÇÕµÈ
    °¡»óÈ£½ºÆ®</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#default"><code>_default_</code> °¡»óÈ£½ºÆ®
    »ç¿ëÇϱâ</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#migrate">À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ IP±â¹Ý
    °¡»óÈ£½ºÆ®·Î ¿Å±â±â</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#serverpath"><code>ServerPath</code>
	Áö½Ã¾î »ç¿ëÇϱâ</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="purename" id="purename">IP ÁÖ¼Ò ÇÑ°³¿¡ ¿©·¯ À̸§±â¹Ý
    À¥»çÀÌÆ® ¿î¿µÇϱâ.</a></h2>

    <p>¼­¹ö¿¡ IP ÁÖ¼Ò°¡ ÇÑ°³ ÀÖ°í, DNS¿¡¼­ ¿©·¯ ÁÖ¼Ò(CNAMES)°¡
    ÀÌ ÄÄÇ»Å͸¦ °¡¸®Å²´Ù. ÀÌ ÄÄÇ»ÅÍ¿¡¼­ <code>www.example1.com</code>°ú
    <code>www.example2.org</code>ÀÇ À¥¼­¹ö¸¦ ½ÇÇàÇÏ°í ½Í´Ù.</p>

    <div class="note"><h3>Note</h3><p>¾ÆÆÄÄ¡ ¼­¹ö¿¡ °¡»óÈ£½ºÆ® ¼³Á¤À»
          ÇÑ´Ù°í ±× È£½ºÆ®¸í¿¡ ´ëÇÑ DNS Ç׸ñÀÌ ÀÚµ¿ÀÌ·Î »ý¼ºµÇÁö
          ¾Ê´Â´Ù. <em>¹Ýµå½Ã</em> DNS¿¡ IP ÁÖ¼Ò¸¦ °¡¸®Å°´Â
          À̸§ÀÌ ÀÖ¾î¾ß ÇÑ´Ù. ¾È±×·¯¸é ¾Æ¹«µµ À¥»çÀÌÆ®¸¦ º¼
          ¼ö ¾ø´Ù. °Ë»çÇغ¸±â À§ÇØ <code>hosts</code> ÆÄÀÏ¿¡ Ç׸ñÀ»
          Ãß°¡ÇÒ ¼ö ÀÖÁö¸¸, ÀÌ´Â hosts Ç׸ñÀ» °¡Áø ÄÄÇ»ÅÍ¿¡¸¸
          ¹Ý¿µµÈ´Ù.</p>
    </div>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    # ¾ÆÆÄÄ¡°¡ Æ÷Æ® 80À» ±â´Ù¸°´Ù<br />
    Listen 80<br />
    <br />
    # ¸ðµç IP ÁÖ¼Ò¿¡¼­ °¡»óÈ£½ºÆ® ¿äûÀ» ±â´Ù¸°´Ù<br />
    NameVirtualHost *:80<br />
    <br />
    &lt;VirtualHost *:80&gt;<br />
    <span class="indent">
      DocumentRoot /www/example1<br />
      ServerName www.example1.com<br />
      <br />
      # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù<br />
      <br />
    </span>
    &lt;/VirtualHost&gt;<br />
    <br />
    &lt;VirtualHost *:80&gt;<br />
    <span class="indent">
      DocumentRoot /www/example2<br />
      ServerName www.example2.org<br />
      <br />
      # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù<br />
      <br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p>º°Ç¥´Â ¸ðµç ÁÖ¼Ò¸¦ °¡¸®Å°¹Ç·Î, ÁÖ¼­¹ö´Â ¾î¶² ¿äûµµ
    ¼­ºñ½ºÇÏÁö ¾Ê´Â´Ù. <code>www.example1.com</code>ÀÌ
    ¼³Á¤ÆÄÀÏ¿¡ óÀ½À¸·Î ³ª¿À¹Ç·Î °¡Àå ³ôÀº ¿ì¼±¼øÀ§¸¦ °¡Áö¸ç,
    <cite>±âº»</cite>ȤÀº <cite>Ãʱâ</cite> ¼­¹ö°¡ µÈ´Ù.
    ¾î¶² <code>ServerName</code> Áö½Ã¾î¿¡µµ ÇØ´çµÇÁö¾Ê´Â ¿äûÀº
    ù¹ø° <code>VirtualHost</code>°¡ ¼­ºñ½ºÇÑ´Ù.</p>

    <div class="note">
            <h3>ÁÖÀÇ</h3>

            <p>¿øÇÑ´Ù¸é <code>*</code> ´ë½Å ½Ã½ºÅÛÀÇ ½ÇÁ¦ IP
            ÁÖ¼Ò¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ÀÌ °æ¿ì
            <code>VirtualHost</code>ÀÇ ¾Æ±Ô¸ÕÆ®´Â
            <code>NameVirtualHost</code>ÀÇ ¾Æ±Ô¸ÕÆ®¿Í ÀÏÄ¡Çؾß
            <em>ÇÑ´Ù</em>:</p>

            <div class="example"><p><code>
            NameVirtualHost 172.20.30.40<br />
						<br />
            &lt;VirtualHost 172.20.30.40&gt;<br />
 		        # »ý·« ...
            </code></p></div>

           <p>±×·¯³ª ISP¿¡¼­ µ¿ÀûÀ¸·Î IP ÁÖ¼Ò¸¦ °¡Á®¿À´Â µî
           IP ÁÖ¼Ò¸¦ ¸ð¸£´Â °æ¿ì¿¡´Â <code>*</code>¸¦ »ç¿ëÇÏ´Â
           °ÍÀÌ À¯¿ëÇÏ´Ù. <code>*</code>´Â ¸ðµç IP ÁÖ¼Ò¿¡
           ÇØ´çÇϹǷÎ, IP ÁÖ¼Ò°¡ º¯°æµÇ¾îµµ ¼³Á¤À» º¯°æÇÒ
           ÇÊ¿ä°¡ ¾ø´Ù.</p>
    </div>

    <p>°ÅÀÇ ´ëºÎºÐÀÇ À̸§±â¹Ý °¡»óÈ£½ºÆ® ¼³Á¤Àº À§¿Í °°´Ù.
    ¿¹¿Ü´Â ´Ù¸¥ IP ÁÖ¼Ò³ª Æ÷Æ®·Î ´Ù¸¥ ³»¿ëÀ» ¼­ºñ½ºÇÏ·Á´Â
    °æ¿ìÀÌ´Ù.</p>

	</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="twoips" id="twoips">¿©·¯ IP ÁÖ¼Ò¿¡¼­ À̸§±â¹Ý
    È£½ºÆ®.</a></h2>

  	<div class="note">
		  <h3>ÁÖÀÇ</h3><p>¿©±â¼­ ¼³¸íÇÑ ¹æ¹ýÀº IP ÁÖ¼Ò°¡
          ¸î°³¶óµµ Àû¿ë°¡´ÉÇÏ´Ù.</p>
    </div>

    <p>¼­¹ö´Â IP ÁÖ¼Ò°¡ µÎ°³ÀÖ´Ù. Çϳª¿¡¼­
    (<code>172.20.30.40</code>) "ÁÖ" ¼­¹ö
    <code>server.domain.com</code>À» ¼­ºñ½ºÇÏ°í, ´Ù¸¥ Çϳª¿¡¼­
    (<code>172.20.30.50</code>) ¿©·¯ °¡»óÈ£½ºÆ®¸¦ ¼­ºñ½ºÇÒ
    °ÍÀÌ´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    Listen 80<br />
		<br />
    # 172.20.30.40¿¡¼­ ½ÇÇàÇÏ´Â "ÁÖ"¼­¹öÀÌ´Ù<br />
    ServerName server.domain.com<br />
    DocumentRoot /www/mainserver<br />
		<br />
    # ´Ù¸¥ ÁÖ¼Ò´Ù<br />
    NameVirtualHost 172.20.30.50<br />
		<br />
    &lt;VirtualHost 172.20.30.50&gt;<br />
    <span class="indent">
        DocumentRoot /www/example1<br />
        ServerName www.example1.com<br />
   			<br />
        # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù ...<br />
				<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.50&gt;<br />
    <span class="indent">
        DocumentRoot /www/example2<br />
        ServerName www.example2.org<br />
				<br />
        # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù ...<br />
				<br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p><code>172.20.30.50</code>ÀÌ ¾Æ´Ñ ÁÖ¼Ò¿¡ ´ëÇÑ ¿äûÀº
    ÁÖ¼­¹ö°¡ ¼­ºñ½ºÇÑ´Ù. È£½ºÆ®¸í ¾øÀÌ, Áï <code>Host:</code>
    Çì´õ¾øÀÌ <code>172.20.30.50</code>·Î ¿äûÇϸé
    <code>www.example1.com</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="intraextra" id="intraextra">(³»ºÎ¿Í ¿ÜºÎ ÁÖ¼Ò¿Í °°ÀÌ)
    ´Ù¸¥ IP ÁÖ¼Ò·Î °°Àº ³»¿ëÀ» ¼­ºñ½ºÇϱâ.</a></h2>

    <p>¼­¹ö ÄÄÇ»ÅÍ¿¡ IP ÁÖ¼Ò°¡ µÎ°³ (<code>192.168.1.1</code>°ú
    <code>172.20.30.40</code>) ÀÖ´Ù. ÄÄÇ»ÅÍ´Â ³»ºÎ (ÀÎÆ®¶ó³Ý)
    ³×Æ®¿÷°ú ¿ÜºÎ (ÀÎÅͳÝ) ³×Æ®¿÷ »çÀÌ¿¡ À§Ä¡ÇÑ´Ù. ³×Æ®¿÷ ¹Û¿¡¼­
    <code>server.example.com</code>Àº ¿ÜºÎ ÁÖ¼Ò¸¦
    (<code>172.20.30.40</code>) ÀǹÌÇÏ°í, ³×Æ®¿÷ ³»ºÎ¿¡¼­ °°Àº
    À̸§À» ³»ºÎ ÁÖ¼Ò·Î (<code>192.168.1.1</code>) »ç¿ëÇÑ´Ù.</p>

    <p>¼­¹ö´Â <code>VirtualHost</code> ¼½¼Ç ÇÑ°³·Î ³»ºÎ¿Í ¿ÜºÎ
    ÀÀ´ä¿¡ °°Àº ³»¿ëÀ» ¼­ºñ½ºÇÒ ¼ö ÀÖ´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    NameVirtualHost 192.168.1.1<br />
    NameVirtualHost 172.20.30.40<br />
		<br />
    &lt;VirtualHost 192.168.1.1 172.20.30.40&gt;<br />
    <span class="indent">
        DocumentRoot /www/server1<br />
        ServerName server.example.com<br />
        ServerAlias server<br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p>ÀÌÁ¦ µÎ ³×Æ®¿÷¿¡¼­ µé¾î¿Â ¿äûÀ» °°Àº
    <code>VirtualHost</code>¿¡¼­ ¼­ºñ½ºÇÑ´Ù.</p>

    <div class="note">
          <h3>ÁÖÀÇ:</h3><p>³»ºÎ ³×Æ®¿÷¿¡¼­´Â ¿ÏÀüÇÑ È£½ºÆ®¸í
          <code>server.example.com</code> ´ë½Å À̸§
          <code>server</code>µµ °¡´ÉÇÏ´Ù.</p>

          <p>¶ÇÇÑ À§ÀÇ ¿¹¿¡¼­ IP ÁÖ¼Ò ´ë½Å <code>*</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="port" id="port">¿©·¯ Æ÷Æ®¿¡¼­ ¼­·Î ´Ù¸¥ »çÀÌÆ®
    ¿î¿µÇϱâ.</a></h2>

    <p>°°Àº IPÀÇ ¿©·¯ Æ÷Æ®¿¡¼­ ¼­·Î ´Ù¸¥ µµ¸ÞÀÎÀ» ¼­ºñ½ºÇÑ´Ù°í
    °¡Á¤ÇÏÀÚ. ÀÌ´Â "NameVirtualHost" ű׿¡ Æ÷Æ®¸¦ Á¤ÀÇÇϸé
    °¡´ÉÇÏ´Ù. NameVirtualHost name:port¾øÀÌ &lt;VirtualHost
    name:port&gt;¸¸ ȤÀº Listen Áö½Ã¾î¸¸ »ç¿ëÇÏ¸é ¾ÈµÈ´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    Listen 80<br />
    Listen 8080<br />
		<br />
    NameVirtualHost 172.20.30.40:80<br />
    NameVirtualHost 172.20.30.40:8080<br />
		<br />
    &lt;VirtualHost 172.20.30.40:80&gt;<br />
    <span class="indent">
        ServerName www.example1.com<br />
        DocumentRoot /www/domain-80<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
    <span class="indent">
        ServerName www.example1.com<br />
        DocumentRoot /www/domain-8080<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40:80&gt;<br />
    <span class="indent">
        ServerName www.example2.org<br />
        DocumentRoot /www/otherdomain-80<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
    <span class="indent">
        ServerName www.example2.org<br />
        DocumentRoot /www/otherdomain-8080<br />
    </span>
    &lt;/VirtualHost&gt;
    </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="ip" id="ip">IP±â¹Ý °¡»óÈ£½ºÆ®</a></h2>

    <p>¼­¹ö´Â °¢°¢ <code>www.example1.com</code>°ú
    <code>www.example2.org</code>¿¡ ÇØ´çÇÏ´Â µÎ IP ÁÖ¼Ò¸¦
    (<code>172.20.30.40</code>°ú <code>172.20.30.50</code>)
    °¡Áø´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    Listen 80<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    <span class="indent">
        DocumentRoot /www/example1<br />
        ServerName www.example1.com<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.50&gt;<br />
    <span class="indent">
        DocumentRoot /www/example2<br />
        ServerName www.example2.org<br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p><code>&lt;VirtualHost&gt;</code> Áö½Ã¾î·Î ÁöÁ¤ÇÑ ÁÖ¼Ò¿¡
    ÇØ´çÇÏÁö¾Ê´Â ÁÖ¼Ò·Î (¿¹¸¦ µé¾î, <code>localhost</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="ipport" id="ipport">Æ÷Æ®±â¹Ý°ú ip±â¹ÝÀÌ È¥ÇÕµÈ
    °¡»óÈ£½ºÆ®</a></h2>

    <p>¼­¹ö´Â °¢°¢ <code>www.example1.com</code>°ú
    <code>www.example2.org</code>¿¡ ÇØ´çÇÏ´Â µÎ IP ÁÖ¼Ò¸¦
    (<code>172.20.30.40</code>°ú <code>172.20.30.50</code>)
    °¡Áø´Ù. °¢ IPÀÇ 80¹ø°ú 8080¹ø Æ÷Æ®¿¡ °¡»óÈ£½ºÆ®¸¦ µ¹¸°´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    Listen 172.20.30.40:80<br />
    Listen 172.20.30.40:8080<br />
    Listen 172.20.30.50:80<br />
    Listen 172.20.30.50:8080<br />
		<br />
    &lt;VirtualHost 172.20.30.40:80&gt;<br />
    <span class="indent">
        DocumentRoot /www/example1-80<br />
        ServerName www.example1.com<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40:8080&gt;<br />
    <span class="indent">
        DocumentRoot /www/example1-8080<br />
        ServerName www.example1.com<br />
		</span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.50:80&gt;<br />
    <span class="indent">
        DocumentRoot /www/example2-80<br />
        ServerName www.example1.org<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.50:8080&gt;<br />
    <span class="indent">
        DocumentRoot /www/example2-8080<br />
        ServerName www.example2.org<br />
    </span>
    &lt;/VirtualHost&gt;
    </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="mixed" id="mixed">À̸§±â¹Ý°ú IP±â¹ÝÀÌ È¥ÇÕµÈ
    °¡»óÈ£½ºÆ®</a></h2>

    <p>ÁÖ¼ÒÁß ¸î¸îÀº À̸§±â¹Ý °¡»óÈ£½ºÆ®·Î, ´Ù¸¥ °ÍÀº IP±â¹Ý
    °¡»óÈ£½ºÆ®·Î ¼­ºñ½ºÇÏ°í ½Í´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    Listen 80<br />
		<br />
    NameVirtualHost 172.20.30.40<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    <span class="indent">
        DocumentRoot /www/example1<br />
        ServerName www.example1.com<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    <span class="indent">
        DocumentRoot /www/example2<br />
        ServerName www.example2.org<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    <span class="indent">
        DocumentRoot /www/example3<br />
        ServerName www.example3.net<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    # IP-±â¹Ý<br />
    &lt;VirtualHost 172.20.30.50&gt;<br />
    <span class="indent">
        DocumentRoot /www/example4<br />
        ServerName www.example4.edu<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.60&gt;<br />
    <span class="indent">
        DocumentRoot /www/example5<br />
        ServerName www.example5.gov<br />
    </span>
    &lt;/VirtualHost&gt;
    </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="default" id="default"><code>_default_</code> °¡»óÈ£½ºÆ®
    »ç¿ëÇϱâ</a></h2>

  	<h3><a name="defaultallports" id="defaultallports">¸ðµç Æ÷Æ®¿¡ ´ëÇÑ
    <code>_default_</code> °¡»óÈ£½ºÆ®</a></h3>

    <p>¾î¶² °¡»óÈ£½ºÆ®¿¡µµ ÇØ´çÇÏÁö¾ÊÀº IP ÁÖ¼Ò¿Í Æ÷Æ®¿¡ ´ëÇÑ
    <em>¸ðµç</em> ¿äûÀ» ó¸®Çϱâ.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    &lt;VirtualHost _default_:*&gt;<br />
    <span class="indent">
        DocumentRoot /www/default<br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p>default(±âº») °¡»óÈ£½ºÆ®ÀÇ Æ÷Æ®·Î ¿ÍÀϵåÄ«µå¸¦ »ç¿ëÇÏ¿© ¾î¶² ¿äûµµ
    ÁÖ¼­¹ö·Î ¸ø°¡µµ·Ï ¸¸µç´Ù.</p>

    <p>default °¡»óÈ£½ºÆ®´Â Àý´ë·Î À̸§±â¹Ý °¡»óÈ£½ºÆ®°¡ »ç¿ëÇÏ´Â
    ÁÖ¼Ò/Æ÷Æ®·ÎÀÇ ¿äûÀ» ¼­ºñ½ºÇÏÁö ¾Ê´Â´Ù. ¾Ë ¼ö ¾ø°Å³ª
    <code>Host:</code> Çì´õ°¡ »ý·«µÈ ¿äûÀº Ç×»ó ÃÖÃÊÀÇ À̸§±â¹Ý
    °¡»óÈ£½ºÆ®(¼³Á¤ÆÄÀÏ¿¡¼­
    ÁÖ¼Ò/Æ÷Æ®°¡ óÀ½À¸·Î ³ª¿Â °¡»óÈ£½ºÆ®)°¡ ¼­ºñ½ºÇÑ´Ù.</p>

    <p><code class="directive"><a href="../mod/mod_alias.html#aliasmatch">AliasMatch</a></code>³ª
    <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>À»
    »ç¿ëÇÏ¿© ¾î¶² ¿äûÀ» ƯÁ¤ ÆäÀÌÁö(ȤÀº ½ºÅ©¸³Æ®)·Î
    ÀçÀÛ¼ºÇÒ(rewrite) ¼ö ÀÖ´Ù.</p>
    

    <h3><a name="defaultdifferentports" id="defaultdifferentports">¿©·¯ Æ÷Æ®¿¡ ´ëÇÑ
    <code>_default_</code> °¡»óÈ£½ºÆ®</a></h3>

    <p>À§ÀÇ °æ¿ì¿Í °°Áö¸¸, ¼­¹ö´Â ¿©·¯ Æ÷Æ®¸¦ ±â´Ù¸®°í 80¹ø
    Æ÷Æ®¿¡ ´ëÇؼ­ Ãß°¡·Î <code>_default_</code> °¡»óÈ£½ºÆ®¸¦
    »ç¿ëÇÏ°í ½Í´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    &lt;VirtualHost _default_:80&gt;<br />
    <span class="indent">
        DocumentRoot /www/default80<br />
        # ...<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost _default_:*&gt;<br />
    <span class="indent">
        DocumentRoot /www/default<br />
        # ...<br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p>80¹ø Æ÷Æ®¿¡ ´ëÇÑ default °¡»óÈ£½ºÆ®´Â (<em>¹Ýµå½Ã</em>
    ¿ÍÀϵåÄ«µå Æ÷Æ®¸¦ °¡Áø ±âº» °¡»óÈ£½ºÆ® ÀÌÀü¿¡ ³ª¿Í¾ß ÇÑ´Ù)
    ÁöÁ¤ÇÏÁö¾ÊÀº IP ÁÖ¼Ò·Î º¸³»Áø ¸ðµç ¿äûÀ» ¼­ºñ½ºÇÑ´Ù.
    ÁÖ¼­¹ö´Â Àý´ë·Î ¿äûÀ» ¼­ºñ½ºÇÏÁö ¸øÇÑ´Ù.</p>
    

    <h3><a name="defaultoneport" id="defaultoneport">ÇÑ Æ÷Æ®¿¡ ´ëÇÑ
    <code>_default_</code> °¡»óÈ£½ºÆ®</a></h3>

    <p>80¹ø Æ÷Æ®¿¡ ´ëÇؼ­¸¸ default °¡»óÈ£½ºÆ®¸¦ ¸¸µé°í ½Í´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    &lt;VirtualHost _default_:80&gt;<br />
    DocumentRoot /www/default<br />
    ...<br />
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p>Æ÷Æ® 80¹ø¿¡ ÁöÁ¤ÇÏÁö¾ÊÀº ÁÖ¼Ò¿¡ ´ëÇÑ ¿äûÀº ±âº»
    °¡»óÈ£½ºÆ®°¡ ¼­ºñ½ºÇÏ°í, ´Ù¸¥ ÁöÁ¤ÇÏÁö¾ÊÀº ÁÖ¼Ò¿Í Æ÷Æ®¸¦
    °¡Áø ¿äûÀº ÁÖ ¼­¹ö°¡ ¼­ºñ½ºÇÑ´Ù.</p>
    

	</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="migrate" id="migrate">À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ IP±â¹Ý
    °¡»óÈ£½ºÆ®·Î ¿Å±â±â</a></h2>

    <p>(<a href="#name">À̸§±â¹Ý</a>ÀÇ Ã¹¹ø° ¿¹¿¡¼­) È£½ºÆ®¸í
    <code>www.example2.org</code>¿¡ ´ëÇÑ À̸§±â¹Ý °¡»óÈ£½ºÆ®´Â
    ÀÚ½ÅÀÇ IP ÁÖ¼Ò¸¦ °¡Á®¾ß ÇÑ´Ù. À̸§±â¹Ý °¡»óÈ£½ºÆ®ÀÇ ÀÌÀü
    IP ÁÖ¼Ò¸¦ ij½ÌÇÏ´Â ³×ÀÓ¼­¹ö³ª ÇÁ·Ï½Ã¿ÍÀÇ ¹®Á¦¸¦ ÇÇÇϱâÀ§ÇØ
    ¿Å±â´Â µ¿¾È µÑ ¸ðµÎ¸¦ ¼­ºñ½ºÇÏ°í ½Í´Ù.<br /> ¹æ¹ýÀº
    <code>VirtualHost</code> Áö½Ã¾î¿¡ »õ IP ÁÖ¼Ò¸¸À»
    (<code>172.20.30.50</code>) Ãß°¡ÇϸéµÇ¹Ç·Î ½±´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    Listen 80<br />
    ServerName www.example1.com<br />
    DocumentRoot /www/example1<br />
		<br />
    NameVirtualHost 172.20.30.40<br />
		<br />
    &lt;VirtualHost 172.20.30.40 172.20.30.50&gt;<br />
    <span class="indent">
        DocumentRoot /www/example2<br />
        ServerName www.example2.org<br />
        # ...<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    <span class="indent">
        DocumentRoot /www/example3<br />
        ServerName www.example3.net<br />
        ServerAlias *.example3.net<br />
        # ...<br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p>ÀÌÁ¦ (IP±â¹Ý °¡»óÈ£½ºÆ®¸¦ ÅëÇÑ) »õ·Î¿î ÁÖ¼Ò¿Í (À̸§±â¹Ý
    °¡»óÈ£½ºÆ®¸¦ ÅëÇÑ) ÀÌÀü ÁÖ¼Ò ¸ðµÎ °¡»óÈ£½ºÆ®¿¡ Á¢±ÙÇÒ
    ¼ö ÀÖ´Ù.</p>

	</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="serverpath" id="serverpath"><code>ServerPath</code>
	Áö½Ã¾î »ç¿ëÇϱâ</a></h2>

    <p>µÎ À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ °¡Áø ¼­¹ö°¡ ÀÖ´Ù. ¿Ã¹Ù¸¥
    °¡»óÈ£½ºÆ®¸¦ ¼±ÅÃÇϱâÀ§ÇØ Å¬¶óÀ̾ðÆ®´Â ¿Ã¹Ù¸¥
    <code>Host:</code> Çì´õ¸¦ º¸³»¾ß ÇÑ´Ù. ¿À·¡µÈ HTTP/1.0
    Ŭ¶óÀ̾ðÆ®°¡ ÀÌ Çì´õ¸¦ º¸³»Áö ¸øÇÏ¸é ¾ÆÆÄÄ¡´Â Ŭ¶óÀ̾ðÆ®°¡
    ¾î¶² °¡»óÈ£½ºÆ®¸¦ º¸·Á°íÇÏ´ÂÁö ¾Ë ¼ö ¾ø´Ù (±×·¡¼­ ÃÖÃÊÀÇ
    °¡»óÈ£½ºÆ®°¡ ¿äûÀ» ¼­ºñ½ºÇÑ´Ù). ¿À·¡µÈ ºê¶ó¿ìÀú¿Í °¡´ÉÇÑ È£È¯À»
    À¯ÁöÇϱâÀ§ÇØ ÃÖÃÊÀÇ °¡»óÈ£½ºÆ®¸¦ ¸¸µé°í, ¿©±â¿¡ À̸§±â¹Ý
    °¡»óÈ£½ºÆ®ÀÇ URL Á¢µÎ»ç¸¦ Æ÷ÇÔÇÏ´Â ¸µÅ© ¸ñ·Ï ÆäÀÌÁö¸¦
    µÐ´Ù.</p>

    <div class="example"><h3>¼­¹ö ¼³Á¤</h3><p><code>
    

    NameVirtualHost 172.20.30.40<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    <span class="indent">
        # primary vhost<br />
        DocumentRoot /www/subdomain<br />
        RewriteEngine On<br />
        RewriteRule ^/.* /www/subdomain/index.html<br />
        # ...<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    DocumentRoot /www/subdomain/sub1<br />
    <span class="indent">
        ServerName www.sub1.domain.tld<br />
        ServerPath /sub1/<br />
        RewriteEngine On<br />
        RewriteRule ^(/sub1/.*) /www/subdomain$1<br />
        # ...<br />
    </span>
    &lt;/VirtualHost&gt;<br />
		<br />
    &lt;VirtualHost 172.20.30.40&gt;<br />
    <span class="indent">
        DocumentRoot /www/subdomain/sub2<br />
        ServerName www.sub2.domain.tld<br />
        ServerPath /sub2/<br />
        RewriteEngine On<br />
        RewriteRule ^(/sub2/.*) /www/subdomain$1<br />
        # ...<br />
    </span>
    &lt;/VirtualHost&gt;
    </code></p></div>

    <p><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> Áö½Ã¾î¶§¹®¿¡
    URL <code>http://www.sub1.domain.tld/sub1/</code>¿¡ ´ëÇÑ
    ¿äûÀº <em>Ç×»ó</em> subl-°¡»óÈ£½ºÆ®°¡ ¼­ºñ½ºÇÑ´Ù.<br />
    Ŭ¶óÀ̾ðÆ®°¡ ¿Ã¹Ù¸¥ <code>Host:</code> Çì´õ¸¦ º¸³½´Ù¸é,
    URL <code>http://www.sub1.domain.tld/</code>¿¡ ´ëÇÑ ¿äûÀº
    subl-°¡»óÈ£½ºÆ®¿¡¼­¸¸ ¼­ºñ½ºÇÑ´Ù. ¸¸¾à <code>Host:</code> Çì´õ¸¦
    º¸³»Áö¾ÊÀ¸¸é Ŭ¶óÀ̾ðÆ®´Â ÃÖÃÊÀÇ È£½ºÆ®¿¡ ÀÖ´Â Á¤º¸ÆäÀÌÁö¸¦
    º¸°ÔµÈ´Ù.<br /> ¿©±â¿¡ ¹®Á¦°¡ ÀÖÀ½À» ÁÖÀÇÇ϶ó: Ŭ¶óÀ̾ðÆ®°¡
    <code>Host:</code> Çì´õ¸¦ º¸³»Áö¾ÊÀ¸¸é
    <code>http://www.sub2.domain.tld/sub1/</code>¿¡ ´ëÇÑ ¿äûµµ
    subl-°¡»óÈ£½ºÆ®°¡ ¼­ºñ½ºÇÑ´Ù.<br />
    <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>
    Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© ¿Ã¹Ù¸¥ <code>Host:</code> Çì´õ¸¦ º¸³»´Â
    Ŭ¶óÀ̾ðÆ®´Â (<em>¿¹¸¦ µé¾î</em>, URL ÀüÄ¡»ç°¡ Àְųª ¾ø´Â)
    µÎ URLÀ» ¸ðµÎ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>

	</div></div>
<div class="bottomlang">
<p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../ko/vhosts/examples.html" title="Korean">&nbsp;ko&nbsp;</a> |
<a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="T&#252;rk&#231;e">&nbsp;tr&nbsp;</a></p>
</div><div id="footer">
<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>
<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>