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>°¡»óÈ£½ºÆ® ¿¹ - 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" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body id="manual-page"><div id="page-header">
14 <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>
15 <p class="apache">Apache HTTP Server Version 2.0</p>
16 <img alt="" src="../images/feather.gif" /></div>
17 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
19 <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.0</a> > <a href="./">°¡»óÈ£½ºÆ®</a></div><div id="page-content"><div id="preamble"><h1>°¡»óÈ£½ºÆ® ¿¹</h1>
21 <p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English"> en </a> |
22 <a href="../ko/vhosts/examples.html" title="Korean"> ko </a> |
23 <a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
25 <div class="outofdate">ÀÌ ¹®¼´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù.
26 ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼¸¦ Âü°íÇϼ¼¿ä.</div>
29 <p>ÀÌ ¹®¼´Â ÀÚÁÖ ¹®ÀǵǴ °¡»óÈ£½ºÆ®
30 Áú¹®¿¡ ´äÀ» ÇÏ·Á°í ¾²¿©Á³´Ù. »óȲÀº <a href="name-based.html">À̸§±â¹Ý</a>À̳ª <a href="ip-based.html">IP±â¹Ý</a> °¡»óÈ£½ºÆ®¸¦ ÅëÇØ ÇÑ ¼¹ö¿¡¼
31 ¿©·¯ À¥»çÀÌÆ®¸¦ ¼ºñ½ºÇÏ·Á´Â °æ¿ìÀÌ´Ù. ÇÑ ÇÁ·Ï½Ã ¼¹ö µÚ¿¡¼
32 ¿©·¯ ¼¹ö¸¦ »ç¿ëÇÏ¿© »çÀÌÆ®¸¦ ¿î¿µÇÏ´Â °æ¿ì¸¦ ´Ù·é ¹®¼µµ
36 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#purename">IP ÁÖ¼Ò ÇÑ°³¿¡ ¿©·¯ À̸§±â¹Ý
37 À¥»çÀÌÆ® ¿î¿µÇϱâ.</a></li>
38 <li><img alt="" src="../images/down.gif" /> <a href="#twoips">¿©·¯ IP ÁÖ¼Ò¿¡¼ À̸§±â¹Ý
40 <li><img alt="" src="../images/down.gif" /> <a href="#intraextra">(³»ºÎ¿Í ¿ÜºÎ ÁÖ¼Ò¿Í °°ÀÌ)
41 ´Ù¸¥ IP ÁÖ¼Ò·Î °°Àº ³»¿ëÀ» ¼ºñ½ºÇϱâ.</a></li>
42 <li><img alt="" src="../images/down.gif" /> <a href="#port">¿©·¯ Æ÷Æ®¿¡¼ ¼·Î ´Ù¸¥ »çÀÌÆ®
44 <li><img alt="" src="../images/down.gif" /> <a href="#ip">IP±â¹Ý °¡»óÈ£½ºÆ®</a></li>
45 <li><img alt="" src="../images/down.gif" /> <a href="#ipport">Æ÷Æ®±â¹Ý°ú ip±â¹ÝÀÌ È¥ÇÕµÈ
47 <li><img alt="" src="../images/down.gif" /> <a href="#mixed">À̸§±â¹Ý°ú IP±â¹ÝÀÌ È¥ÇÕµÈ
49 <li><img alt="" src="../images/down.gif" /> <a href="#default"><code>_default_</code> °¡»óÈ£½ºÆ®
51 <li><img alt="" src="../images/down.gif" /> <a href="#migrate">À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ IP±â¹Ý
52 °¡»óÈ£½ºÆ®·Î ¿Å±â±â</a></li>
53 <li><img alt="" src="../images/down.gif" /> <a href="#serverpath"><code>ServerPath</code>
54 Áö½Ã¾î »ç¿ëÇϱâ</a></li>
56 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
58 <h2><a name="purename" id="purename">IP ÁÖ¼Ò ÇÑ°³¿¡ ¿©·¯ À̸§±â¹Ý
59 À¥»çÀÌÆ® ¿î¿µÇϱâ.</a></h2>
61 <p>¼¹ö¿¡ IP ÁÖ¼Ò°¡ ÇÑ°³ ÀÖ°í, DNS¿¡¼ ¿©·¯ ÁÖ¼Ò(CNAMES)°¡
62 ÀÌ ÄÄÇ»Å͸¦ °¡¸®Å²´Ù. ÀÌ ÄÄÇ»ÅÍ¿¡¼ <code>www.example1.com</code>°ú
63 <code>www.example2.org</code>ÀÇ À¥¼¹ö¸¦ ½ÇÇàÇÏ°í ½Í´Ù.</p>
65 <div class="note"><h3>Note</h3><p>¾ÆÆÄÄ¡ ¼¹ö¿¡ °¡»óÈ£½ºÆ® ¼³Á¤À»
66 ÇÑ´Ù°í ±× È£½ºÆ®¸í¿¡ ´ëÇÑ DNS Ç׸ñÀÌ ÀÚµ¿ÀÌ·Î »ý¼ºµÇÁö
67 ¾Ê´Â´Ù. <em>¹Ýµå½Ã</em> DNS¿¡ IP ÁÖ¼Ò¸¦ °¡¸®Å°´Â
68 À̸§ÀÌ ÀÖ¾î¾ß ÇÑ´Ù. ¾È±×·¯¸é ¾Æ¹«µµ À¥»çÀÌÆ®¸¦ º¼
69 ¼ö ¾ø´Ù. °Ë»çÇغ¸±â À§ÇØ <code>hosts</code> ÆÄÀÏ¿¡ Ç׸ñÀ»
70 Ãß°¡ÇÒ ¼ö ÀÖÁö¸¸, ÀÌ´Â hosts Ç׸ñÀ» °¡Áø ÄÄÇ»ÅÍ¿¡¸¸
74 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
77 # ¾ÆÆÄÄ¡°¡ Æ÷Æ® 80À» ±â´Ù¸°´Ù<br />
80 # ¸ðµç IP ÁÖ¼Ò¿¡¼ °¡»óÈ£½ºÆ® ¿äûÀ» ±â´Ù¸°´Ù<br />
81 NameVirtualHost *:80<br />
83 <VirtualHost *:80><br />
85 DocumentRoot /www/example1<br />
86 ServerName www.example1.com<br />
88 # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù<br />
91 </VirtualHost><br />
93 <VirtualHost *:80><br />
95 DocumentRoot /www/example2<br />
96 ServerName www.example2.org<br />
98 # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù<br />
104 <p>º°Ç¥´Â ¸ðµç ÁÖ¼Ò¸¦ °¡¸®Å°¹Ç·Î, ÁÖ¼¹ö´Â ¾î¶² ¿äûµµ
105 ¼ºñ½ºÇÏÁö ¾Ê´Â´Ù. <code>www.example1.com</code>ÀÌ
106 ¼³Á¤ÆÄÀÏ¿¡ óÀ½À¸·Î ³ª¿À¹Ç·Î °¡Àå ³ôÀº ¿ì¼±¼øÀ§¸¦ °¡Áö¸ç,
107 <cite>±âº»</cite>ȤÀº <cite>Ãʱâ</cite> ¼¹ö°¡ µÈ´Ù.
108 ¾î¶² <code>ServerName</code> Áö½Ã¾î¿¡µµ ÇØ´çµÇÁö¾Ê´Â ¿äûÀº
109 ù¹ø° <code>VirtualHost</code>°¡ ¼ºñ½ºÇÑ´Ù.</p>
114 <p>¿øÇÑ´Ù¸é <code>*</code> ´ë½Å ½Ã½ºÅÛÀÇ ½ÇÁ¦ IP
115 ÁÖ¼Ò¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ÀÌ °æ¿ì
116 <code>VirtualHost</code>ÀÇ ¾Æ±Ô¸ÕÆ®´Â
117 <code>NameVirtualHost</code>ÀÇ ¾Æ±Ô¸ÕÆ®¿Í ÀÏÄ¡Çؾß
120 <div class="example"><p><code>
121 NameVirtualHost 172.20.30.40<br />
123 <VirtualHost 172.20.30.40><br />
127 <p>±×·¯³ª ISP¿¡¼ µ¿ÀûÀ¸·Î IP ÁÖ¼Ò¸¦ °¡Á®¿À´Â µî
128 IP ÁÖ¼Ò¸¦ ¸ð¸£´Â °æ¿ì¿¡´Â <code>*</code>¸¦ »ç¿ëÇÏ´Â
129 °ÍÀÌ À¯¿ëÇÏ´Ù. <code>*</code>´Â ¸ðµç IP ÁÖ¼Ò¿¡
130 ÇØ´çÇϹǷÎ, IP ÁÖ¼Ò°¡ º¯°æµÇ¾îµµ ¼³Á¤À» º¯°æÇÒ
134 <p>°ÅÀÇ ´ëºÎºÐÀÇ À̸§±â¹Ý °¡»óÈ£½ºÆ® ¼³Á¤Àº À§¿Í °°´Ù.
135 ¿¹¿Ü´Â ´Ù¸¥ IP ÁÖ¼Ò³ª Æ÷Æ®·Î ´Ù¸¥ ³»¿ëÀ» ¼ºñ½ºÇÏ·Á´Â
138 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
139 <div class="section">
140 <h2><a name="twoips" id="twoips">¿©·¯ IP ÁÖ¼Ò¿¡¼ À̸§±â¹Ý
144 <h3>ÁÖÀÇ</h3><p>¿©±â¼ ¼³¸íÇÑ ¹æ¹ýÀº IP ÁÖ¼Ò°¡
145 ¸î°³¶óµµ Àû¿ë°¡´ÉÇÏ´Ù.</p>
148 <p>¼¹ö´Â IP ÁÖ¼Ò°¡ µÎ°³ÀÖ´Ù. Çϳª¿¡¼
149 (<code>172.20.30.40</code>) "ÁÖ" ¼¹ö
150 <code>server.domain.com</code>À» ¼ºñ½ºÇÏ°í, ´Ù¸¥ Çϳª¿¡¼
151 (<code>172.20.30.50</code>) ¿©·¯ °¡»óÈ£½ºÆ®¸¦ ¼ºñ½ºÇÒ
154 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
159 # 172.20.30.40¿¡¼ ½ÇÇàÇÏ´Â "ÁÖ"¼¹öÀÌ´Ù<br />
160 ServerName server.domain.com<br />
161 DocumentRoot /www/mainserver<br />
164 NameVirtualHost 172.20.30.50<br />
166 <VirtualHost 172.20.30.50><br />
167 <span class="indent">
168 DocumentRoot /www/example1<br />
169 ServerName www.example1.com<br />
171 # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù ...<br />
174 </VirtualHost><br />
176 <VirtualHost 172.20.30.50><br />
177 <span class="indent">
178 DocumentRoot /www/example2<br />
179 ServerName www.example2.org<br />
181 # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù ...<br />
187 <p><code>172.20.30.50</code>ÀÌ ¾Æ´Ñ ÁÖ¼Ò¿¡ ´ëÇÑ ¿äûÀº
188 ÁÖ¼¹ö°¡ ¼ºñ½ºÇÑ´Ù. È£½ºÆ®¸í ¾øÀÌ, Áï <code>Host:</code>
189 Çì´õ¾øÀÌ <code>172.20.30.50</code>·Î ¿äûÇϸé
190 <code>www.example1.com</code>ÀÌ ¼ºñ½ºÇÑ´Ù.</p>
192 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
193 <div class="section">
194 <h2><a name="intraextra" id="intraextra">(³»ºÎ¿Í ¿ÜºÎ ÁÖ¼Ò¿Í °°ÀÌ)
195 ´Ù¸¥ IP ÁÖ¼Ò·Î °°Àº ³»¿ëÀ» ¼ºñ½ºÇϱâ.</a></h2>
197 <p>¼¹ö ÄÄÇ»ÅÍ¿¡ IP ÁÖ¼Ò°¡ µÎ°³ (<code>192.168.1.1</code>°ú
198 <code>172.20.30.40</code>) ÀÖ´Ù. ÄÄÇ»ÅÍ´Â ³»ºÎ (ÀÎÆ®¶ó³Ý)
199 ³×Æ®¿÷°ú ¿ÜºÎ (ÀÎÅͳÝ) ³×Æ®¿÷ »çÀÌ¿¡ À§Ä¡ÇÑ´Ù. ³×Æ®¿÷ ¹Û¿¡¼
200 <code>server.example.com</code>Àº ¿ÜºÎ ÁÖ¼Ò¸¦
201 (<code>172.20.30.40</code>) ÀǹÌÇÏ°í, ³×Æ®¿÷ ³»ºÎ¿¡¼ °°Àº
202 À̸§À» ³»ºÎ ÁÖ¼Ò·Î (<code>192.168.1.1</code>) »ç¿ëÇÑ´Ù.</p>
204 <p>¼¹ö´Â <code>VirtualHost</code> ¼½¼Ç ÇÑ°³·Î ³»ºÎ¿Í ¿ÜºÎ
205 ÀÀ´ä¿¡ °°Àº ³»¿ëÀ» ¼ºñ½ºÇÒ ¼ö ÀÖ´Ù.</p>
207 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
210 NameVirtualHost 192.168.1.1<br />
211 NameVirtualHost 172.20.30.40<br />
213 <VirtualHost 192.168.1.1 172.20.30.40><br />
214 <span class="indent">
215 DocumentRoot /www/server1<br />
216 ServerName server.example.com<br />
217 ServerAlias server<br />
222 <p>ÀÌÁ¦ µÎ ³×Æ®¿÷¿¡¼ µé¾î¿Â ¿äûÀ» °°Àº
223 <code>VirtualHost</code>¿¡¼ ¼ºñ½ºÇÑ´Ù.</p>
226 <h3>ÁÖÀÇ:</h3><p>³»ºÎ ³×Æ®¿÷¿¡¼´Â ¿ÏÀüÇÑ È£½ºÆ®¸í
227 <code>server.example.com</code> ´ë½Å À̸§
228 <code>server</code>µµ °¡´ÉÇÏ´Ù.</p>
230 <p>¶ÇÇÑ À§ÀÇ ¿¹¿¡¼ IP ÁÖ¼Ò ´ë½Å <code>*</code>À»
231 »ç¿ëÇÏ¿© ¼¹ö°¡ ¸ðµç ÁÖ¼Ò¿¡ µ¿ÀÏÇÏ°Ô µ¿ÀÛÇÒ ¼ö
235 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
236 <div class="section">
237 <h2><a name="port" id="port">¿©·¯ Æ÷Æ®¿¡¼ ¼·Î ´Ù¸¥ »çÀÌÆ®
240 <p>°°Àº IPÀÇ ¿©·¯ Æ÷Æ®¿¡¼ ¼·Î ´Ù¸¥ µµ¸ÞÀÎÀ» ¼ºñ½ºÇÑ´Ù°í
241 °¡Á¤ÇÏÀÚ. ÀÌ´Â "NameVirtualHost" ű׿¡ Æ÷Æ®¸¦ Á¤ÀÇÇϸé
242 °¡´ÉÇÏ´Ù. NameVirtualHost name:port¾øÀÌ <VirtualHost
243 name:port>¸¸ ȤÀº Listen Áö½Ã¾î¸¸ »ç¿ëÇÏ¸é ¾ÈµÈ´Ù.</p>
245 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
251 NameVirtualHost 172.20.30.40:80<br />
252 NameVirtualHost 172.20.30.40:8080<br />
254 <VirtualHost 172.20.30.40:80><br />
255 <span class="indent">
256 ServerName www.example1.com<br />
257 DocumentRoot /www/domain-80<br />
259 </VirtualHost><br />
261 <VirtualHost 172.20.30.40:8080><br />
262 <span class="indent">
263 ServerName www.example1.com<br />
264 DocumentRoot /www/domain-8080<br />
266 </VirtualHost><br />
268 <VirtualHost 172.20.30.40:80><br />
269 <span class="indent">
270 ServerName www.example2.org<br />
271 DocumentRoot /www/otherdomain-80<br />
273 </VirtualHost><br />
275 <VirtualHost 172.20.30.40:8080><br />
276 <span class="indent">
277 ServerName www.example2.org<br />
278 DocumentRoot /www/otherdomain-8080<br />
283 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
284 <div class="section">
285 <h2><a name="ip" id="ip">IP±â¹Ý °¡»óÈ£½ºÆ®</a></h2>
287 <p>¼¹ö´Â °¢°¢ <code>www.example1.com</code>°ú
288 <code>www.example2.org</code>¿¡ ÇØ´çÇÏ´Â µÎ IP ÁÖ¼Ò¸¦
289 (<code>172.20.30.40</code>°ú <code>172.20.30.50</code>)
292 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
297 <VirtualHost 172.20.30.40><br />
298 <span class="indent">
299 DocumentRoot /www/example1<br />
300 ServerName www.example1.com<br />
302 </VirtualHost><br />
304 <VirtualHost 172.20.30.50><br />
305 <span class="indent">
306 DocumentRoot /www/example2<br />
307 ServerName www.example2.org<br />
312 <p><code><VirtualHost></code> Áö½Ã¾î·Î ÁöÁ¤ÇÑ ÁÖ¼Ò¿¡
313 ÇØ´çÇÏÁö¾Ê´Â ÁÖ¼Ò·Î (¿¹¸¦ µé¾î, <code>localhost</code>)
314 ¿äûÀÌ µé¾î¿À¸é ÁÖ¼¹ö°¡ ÀÖ´Â °æ¿ì ÁÖ¼¹ö°¡ ¼ºñ½ºÇÑ´Ù.</p>
316 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
317 <div class="section">
318 <h2><a name="ipport" id="ipport">Æ÷Æ®±â¹Ý°ú ip±â¹ÝÀÌ È¥ÇÕµÈ
321 <p>¼¹ö´Â °¢°¢ <code>www.example1.com</code>°ú
322 <code>www.example2.org</code>¿¡ ÇØ´çÇÏ´Â µÎ IP ÁÖ¼Ò¸¦
323 (<code>172.20.30.40</code>°ú <code>172.20.30.50</code>)
324 °¡Áø´Ù. °¢ IPÀÇ 80¹ø°ú 8080¹ø Æ÷Æ®¿¡ °¡»óÈ£½ºÆ®¸¦ µ¹¸°´Ù.</p>
326 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
329 Listen 172.20.30.40:80<br />
330 Listen 172.20.30.40:8080<br />
331 Listen 172.20.30.50:80<br />
332 Listen 172.20.30.50:8080<br />
334 <VirtualHost 172.20.30.40:80><br />
335 <span class="indent">
336 DocumentRoot /www/example1-80<br />
337 ServerName www.example1.com<br />
339 </VirtualHost><br />
341 <VirtualHost 172.20.30.40:8080><br />
342 <span class="indent">
343 DocumentRoot /www/example1-8080<br />
344 ServerName www.example1.com<br />
346 </VirtualHost><br />
348 <VirtualHost 172.20.30.50:80><br />
349 <span class="indent">
350 DocumentRoot /www/example2-80<br />
351 ServerName www.example1.org<br />
353 </VirtualHost><br />
355 <VirtualHost 172.20.30.50:8080><br />
356 <span class="indent">
357 DocumentRoot /www/example2-8080<br />
358 ServerName www.example2.org<br />
363 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
364 <div class="section">
365 <h2><a name="mixed" id="mixed">À̸§±â¹Ý°ú IP±â¹ÝÀÌ È¥ÇÕµÈ
368 <p>ÁÖ¼ÒÁß ¸î¸îÀº À̸§±â¹Ý °¡»óÈ£½ºÆ®·Î, ´Ù¸¥ °ÍÀº IP±â¹Ý
369 °¡»óÈ£½ºÆ®·Î ¼ºñ½ºÇÏ°í ½Í´Ù.</p>
371 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
376 NameVirtualHost 172.20.30.40<br />
378 <VirtualHost 172.20.30.40><br />
379 <span class="indent">
380 DocumentRoot /www/example1<br />
381 ServerName www.example1.com<br />
383 </VirtualHost><br />
385 <VirtualHost 172.20.30.40><br />
386 <span class="indent">
387 DocumentRoot /www/example2<br />
388 ServerName www.example2.org<br />
390 </VirtualHost><br />
392 <VirtualHost 172.20.30.40><br />
393 <span class="indent">
394 DocumentRoot /www/example3<br />
395 ServerName www.example3.net<br />
397 </VirtualHost><br />
400 <VirtualHost 172.20.30.50><br />
401 <span class="indent">
402 DocumentRoot /www/example4<br />
403 ServerName www.example4.edu<br />
405 </VirtualHost><br />
407 <VirtualHost 172.20.30.60><br />
408 <span class="indent">
409 DocumentRoot /www/example5<br />
410 ServerName www.example5.gov<br />
415 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
416 <div class="section">
417 <h2><a name="default" id="default"><code>_default_</code> °¡»óÈ£½ºÆ®
420 <h3><a name="defaultallports" id="defaultallports">¸ðµç Æ÷Æ®¿¡ ´ëÇÑ
421 <code>_default_</code> °¡»óÈ£½ºÆ®</a></h3>
423 <p>¾î¶² °¡»óÈ£½ºÆ®¿¡µµ ÇØ´çÇÏÁö¾ÊÀº IP ÁÖ¼Ò¿Í Æ÷Æ®¿¡ ´ëÇÑ
424 <em>¸ðµç</em> ¿äûÀ» ó¸®Çϱâ.</p>
426 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
429 <VirtualHost _default_:*><br />
430 <span class="indent">
431 DocumentRoot /www/default<br />
436 <p>default(±âº») °¡»óÈ£½ºÆ®ÀÇ Æ÷Æ®·Î ¿ÍÀϵåÄ«µå¸¦ »ç¿ëÇÏ¿© ¾î¶² ¿äûµµ
437 ÁÖ¼¹ö·Î ¸ø°¡µµ·Ï ¸¸µç´Ù.</p>
439 <p>default °¡»óÈ£½ºÆ®´Â Àý´ë·Î À̸§±â¹Ý °¡»óÈ£½ºÆ®°¡ »ç¿ëÇÏ´Â
440 ÁÖ¼Ò/Æ÷Æ®·ÎÀÇ ¿äûÀ» ¼ºñ½ºÇÏÁö ¾Ê´Â´Ù. ¾Ë ¼ö ¾ø°Å³ª
441 <code>Host:</code> Çì´õ°¡ »ý·«µÈ ¿äûÀº Ç×»ó ÃÖÃÊÀÇ À̸§±â¹Ý
442 °¡»óÈ£½ºÆ®(¼³Á¤ÆÄÀÏ¿¡¼
443 ÁÖ¼Ò/Æ÷Æ®°¡ óÀ½À¸·Î ³ª¿Â °¡»óÈ£½ºÆ®)°¡ ¼ºñ½ºÇÑ´Ù.</p>
445 <p><code class="directive"><a href="../mod/mod_alias.html#aliasmatch">AliasMatch</a></code>³ª
446 <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>À»
447 »ç¿ëÇÏ¿© ¾î¶² ¿äûÀ» ƯÁ¤ ÆäÀÌÁö(ȤÀº ½ºÅ©¸³Æ®)·Î
448 ÀçÀÛ¼ºÇÒ(rewrite) ¼ö ÀÖ´Ù.</p>
451 <h3><a name="defaultdifferentports" id="defaultdifferentports">¿©·¯ Æ÷Æ®¿¡ ´ëÇÑ
452 <code>_default_</code> °¡»óÈ£½ºÆ®</a></h3>
454 <p>À§ÀÇ °æ¿ì¿Í °°Áö¸¸, ¼¹ö´Â ¿©·¯ Æ÷Æ®¸¦ ±â´Ù¸®°í 80¹ø
455 Æ÷Æ®¿¡ ´ëÇؼ Ãß°¡·Î <code>_default_</code> °¡»óÈ£½ºÆ®¸¦
458 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
461 <VirtualHost _default_:80><br />
462 <span class="indent">
463 DocumentRoot /www/default80<br />
466 </VirtualHost><br />
468 <VirtualHost _default_:*><br />
469 <span class="indent">
470 DocumentRoot /www/default<br />
476 <p>80¹ø Æ÷Æ®¿¡ ´ëÇÑ default °¡»óÈ£½ºÆ®´Â (<em>¹Ýµå½Ã</em>
477 ¿ÍÀϵåÄ«µå Æ÷Æ®¸¦ °¡Áø ±âº» °¡»óÈ£½ºÆ® ÀÌÀü¿¡ ³ª¿Í¾ß ÇÑ´Ù)
478 ÁöÁ¤ÇÏÁö¾ÊÀº IP ÁÖ¼Ò·Î º¸³»Áø ¸ðµç ¿äûÀ» ¼ºñ½ºÇÑ´Ù.
479 ÁÖ¼¹ö´Â Àý´ë·Î ¿äûÀ» ¼ºñ½ºÇÏÁö ¸øÇÑ´Ù.</p>
482 <h3><a name="defaultoneport" id="defaultoneport">ÇÑ Æ÷Æ®¿¡ ´ëÇÑ
483 <code>_default_</code> °¡»óÈ£½ºÆ®</a></h3>
485 <p>80¹ø Æ÷Æ®¿¡ ´ëÇؼ¸¸ default °¡»óÈ£½ºÆ®¸¦ ¸¸µé°í ½Í´Ù.</p>
487 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
490 <VirtualHost _default_:80><br />
491 DocumentRoot /www/default<br />
496 <p>Æ÷Æ® 80¹ø¿¡ ÁöÁ¤ÇÏÁö¾ÊÀº ÁÖ¼Ò¿¡ ´ëÇÑ ¿äûÀº ±âº»
497 °¡»óÈ£½ºÆ®°¡ ¼ºñ½ºÇÏ°í, ´Ù¸¥ ÁöÁ¤ÇÏÁö¾ÊÀº ÁÖ¼Ò¿Í Æ÷Æ®¸¦
498 °¡Áø ¿äûÀº ÁÖ ¼¹ö°¡ ¼ºñ½ºÇÑ´Ù.</p>
501 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
502 <div class="section">
503 <h2><a name="migrate" id="migrate">À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ IP±â¹Ý
504 °¡»óÈ£½ºÆ®·Î ¿Å±â±â</a></h2>
506 <p>(<a href="#name">À̸§±â¹Ý</a>ÀÇ Ã¹¹ø° ¿¹¿¡¼) È£½ºÆ®¸í
507 <code>www.example2.org</code>¿¡ ´ëÇÑ À̸§±â¹Ý °¡»óÈ£½ºÆ®´Â
508 ÀÚ½ÅÀÇ IP ÁÖ¼Ò¸¦ °¡Á®¾ß ÇÑ´Ù. À̸§±â¹Ý °¡»óÈ£½ºÆ®ÀÇ ÀÌÀü
509 IP ÁÖ¼Ò¸¦ ij½ÌÇÏ´Â ³×ÀÓ¼¹ö³ª ÇÁ·Ï½Ã¿ÍÀÇ ¹®Á¦¸¦ ÇÇÇϱâÀ§ÇØ
510 ¿Å±â´Â µ¿¾È µÑ ¸ðµÎ¸¦ ¼ºñ½ºÇÏ°í ½Í´Ù.<br /> ¹æ¹ýÀº
511 <code>VirtualHost</code> Áö½Ã¾î¿¡ »õ IP ÁÖ¼Ò¸¸À»
512 (<code>172.20.30.50</code>) Ãß°¡ÇϸéµÇ¹Ç·Î ½±´Ù.</p>
514 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
518 ServerName www.example1.com<br />
519 DocumentRoot /www/example1<br />
521 NameVirtualHost 172.20.30.40<br />
523 <VirtualHost 172.20.30.40 172.20.30.50><br />
524 <span class="indent">
525 DocumentRoot /www/example2<br />
526 ServerName www.example2.org<br />
529 </VirtualHost><br />
531 <VirtualHost 172.20.30.40><br />
532 <span class="indent">
533 DocumentRoot /www/example3<br />
534 ServerName www.example3.net<br />
535 ServerAlias *.example3.net<br />
541 <p>ÀÌÁ¦ (IP±â¹Ý °¡»óÈ£½ºÆ®¸¦ ÅëÇÑ) »õ·Î¿î ÁÖ¼Ò¿Í (À̸§±â¹Ý
542 °¡»óÈ£½ºÆ®¸¦ ÅëÇÑ) ÀÌÀü ÁÖ¼Ò ¸ðµÎ °¡»óÈ£½ºÆ®¿¡ Á¢±ÙÇÒ
545 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
546 <div class="section">
547 <h2><a name="serverpath" id="serverpath"><code>ServerPath</code>
548 Áö½Ã¾î »ç¿ëÇϱâ</a></h2>
550 <p>µÎ À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ °¡Áø ¼¹ö°¡ ÀÖ´Ù. ¿Ã¹Ù¸¥
551 °¡»óÈ£½ºÆ®¸¦ ¼±ÅÃÇϱâÀ§ÇØ Å¬¶óÀ̾ðÆ®´Â ¿Ã¹Ù¸¥
552 <code>Host:</code> Çì´õ¸¦ º¸³»¾ß ÇÑ´Ù. ¿À·¡µÈ HTTP/1.0
553 Ŭ¶óÀ̾ðÆ®°¡ ÀÌ Çì´õ¸¦ º¸³»Áö ¸øÇÏ¸é ¾ÆÆÄÄ¡´Â Ŭ¶óÀ̾ðÆ®°¡
554 ¾î¶² °¡»óÈ£½ºÆ®¸¦ º¸·Á°íÇÏ´ÂÁö ¾Ë ¼ö ¾ø´Ù (±×·¡¼ ÃÖÃÊÀÇ
555 °¡»óÈ£½ºÆ®°¡ ¿äûÀ» ¼ºñ½ºÇÑ´Ù). ¿À·¡µÈ ºê¶ó¿ìÀú¿Í °¡´ÉÇÑ È£È¯À»
556 À¯ÁöÇϱâÀ§ÇØ ÃÖÃÊÀÇ °¡»óÈ£½ºÆ®¸¦ ¸¸µé°í, ¿©±â¿¡ À̸§±â¹Ý
557 °¡»óÈ£½ºÆ®ÀÇ URL Á¢µÎ»ç¸¦ Æ÷ÇÔÇÏ´Â ¸µÅ© ¸ñ·Ï ÆäÀÌÁö¸¦
560 <div class="example"><h3>¼¹ö ¼³Á¤</h3><p><code>
563 NameVirtualHost 172.20.30.40<br />
565 <VirtualHost 172.20.30.40><br />
566 <span class="indent">
567 # primary vhost<br />
568 DocumentRoot /www/subdomain<br />
569 RewriteEngine On<br />
570 RewriteRule ^/.* /www/subdomain/index.html<br />
573 </VirtualHost><br />
575 <VirtualHost 172.20.30.40><br />
576 DocumentRoot /www/subdomain/sub1<br />
577 <span class="indent">
578 ServerName www.sub1.domain.tld<br />
579 ServerPath /sub1/<br />
580 RewriteEngine On<br />
581 RewriteRule ^(/sub1/.*) /www/subdomain$1<br />
584 </VirtualHost><br />
586 <VirtualHost 172.20.30.40><br />
587 <span class="indent">
588 DocumentRoot /www/subdomain/sub2<br />
589 ServerName www.sub2.domain.tld<br />
590 ServerPath /sub2/<br />
591 RewriteEngine On<br />
592 RewriteRule ^(/sub2/.*) /www/subdomain$1<br />
598 <p><code class="directive"><a href="../mod/core.html#serverpath">ServerPath</a></code> Áö½Ã¾î¶§¹®¿¡
599 URL <code>http://www.sub1.domain.tld/sub1/</code>¿¡ ´ëÇÑ
600 ¿äûÀº <em>Ç×»ó</em> subl-°¡»óÈ£½ºÆ®°¡ ¼ºñ½ºÇÑ´Ù.<br />
601 Ŭ¶óÀ̾ðÆ®°¡ ¿Ã¹Ù¸¥ <code>Host:</code> Çì´õ¸¦ º¸³½´Ù¸é,
602 URL <code>http://www.sub1.domain.tld/</code>¿¡ ´ëÇÑ ¿äûÀº
603 subl-°¡»óÈ£½ºÆ®¿¡¼¸¸ ¼ºñ½ºÇÑ´Ù. ¸¸¾à <code>Host:</code> Çì´õ¸¦
604 º¸³»Áö¾ÊÀ¸¸é Ŭ¶óÀ̾ðÆ®´Â ÃÖÃÊÀÇ È£½ºÆ®¿¡ ÀÖ´Â Á¤º¸ÆäÀÌÁö¸¦
605 º¸°ÔµÈ´Ù.<br /> ¿©±â¿¡ ¹®Á¦°¡ ÀÖÀ½À» ÁÖÀÇÇ϶ó: Ŭ¶óÀ̾ðÆ®°¡
606 <code>Host:</code> Çì´õ¸¦ º¸³»Áö¾ÊÀ¸¸é
607 <code>http://www.sub2.domain.tld/sub1/</code>¿¡ ´ëÇÑ ¿äûµµ
608 subl-°¡»óÈ£½ºÆ®°¡ ¼ºñ½ºÇÑ´Ù.<br />
609 <code class="directive"><a href="../mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>
610 Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© ¿Ã¹Ù¸¥ <code>Host:</code> Çì´õ¸¦ º¸³»´Â
611 Ŭ¶óÀ̾ðÆ®´Â (<em>¿¹¸¦ µé¾î</em>, URL ÀüÄ¡»ç°¡ Àְųª ¾ø´Â)
612 µÎ URLÀ» ¸ðµÎ »ç¿ëÇÒ ¼ö ÀÖ´Ù.</p>
615 <div class="bottomlang">
616 <p><span>°¡´ÉÇÑ ¾ð¾î: </span><a href="../en/vhosts/examples.html" hreflang="en" rel="alternate" title="English"> en </a> |
617 <a href="../ko/vhosts/examples.html" title="Korean"> ko </a> |
618 <a href="../tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
619 </div><div id="footer">
620 <p class="apache">Copyright 2009 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>
621 <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>