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 7 --> 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" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" /> 12<script src="/style/scripts/prettify.js" type="text/javascript"> 13</script> 14 15<link href="/images/favicon.ico" rel="shortcut icon" /></head> 16<body id="manual-page"><div id="page-header"> 17<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p> 18<p class="apache">Apache HTTP Server Version 2.2</p> 19<img alt="" src="/images/feather.gif" /></div> 20<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div> 21<div id="path"> 22<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.2</a> > <a href="./">����ȣ��Ʈ</a></div><div id="page-content"><div id="preamble"><h1>����ȣ��Ʈ ��</h1> 23<div class="toplang"> 24<p><span>������ ���: </span><a href="/en/vhosts/examples.html" hreflang="en" rel="alternate" title="English"> en </a> | 25<a href="/fr/vhosts/examples.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | 26<a href="/ja/vhosts/examples.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | 27<a href="/ko/vhosts/examples.html" title="Korean"> ko </a> | 28<a href="/tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 29</div> 30<div class="outofdate">�� ������ �ֽ��� ���� �ƴմϴ�. 31 �ֱٿ� ����� ������ ���� ������ ����ϼ���.</div> 32 33 34 <p>�� ������ ���� ���ǵǴ� ����ȣ��Ʈ 35 �� ���� �Ϸ��� ��������. ��Ȳ�� <a href="name-based.html">�̸����</a>�̳� <a href="ip-based.html">IP���</a> ����ȣ��Ʈ�� ���� �� �������� 36 ���� ������Ʈ�� �����Ϸ��� ����̴�. �� ���Ͻ� ���� �ڿ��� 37 ���� ������ ����Ͽ� ����Ʈ�� ��ϴ� ��츦 �ٷ� ������ 38 �� ���� ���̴�.</p> 39 40</div> 41<div id="quickview"><ul id="toc"><li><img alt="" src="/images/down.gif" /> <a href="#purename">IP �ּ� �Ѱ��� ���� �̸���� 42 ������Ʈ ��ϱ�.</a></li> 43<li><img alt="" src="/images/down.gif" /> <a href="#twoips">���� IP �ּҿ��� �̸���� 44 ȣ��Ʈ.</a></li> 45<li><img alt="" src="/images/down.gif" /> <a href="#intraextra">(���ο� �ܺ� �ּҿ� ����) 46 �ٸ� IP �ּҷ� ���� ������ �����ϱ�.</a></li> 47<li><img alt="" src="/images/down.gif" /> <a href="#port">���� ��Ʈ���� ���� �ٸ� ����Ʈ 48 ��ϱ�.</a></li> 49<li><img alt="" src="/images/down.gif" /> <a href="#ip">IP��� ����ȣ��Ʈ</a></li> 50<li><img alt="" src="/images/down.gif" /> <a href="#ipport">��Ʈ��ݰ� ip����� ȥ�յ� 51 ����ȣ��Ʈ</a></li> 52<li><img alt="" src="/images/down.gif" /> <a href="#mixed">�̸���ݰ� IP����� ȥ�յ� 53 ����ȣ��Ʈ</a></li> 54<li><img alt="" src="/images/down.gif" /> <a href="#default"><code>_default_</code> ����ȣ��Ʈ 55 ����ϱ�</a></li> 56<li><img alt="" src="/images/down.gif" /> <a href="#migrate">�̸���� ����ȣ��Ʈ�� IP��� 57 ����ȣ��Ʈ�� �ű��</a></li> 58<li><img alt="" src="/images/down.gif" /> <a href="#serverpath"><code>ServerPath</code> 59 ���þ� ����ϱ�</a></li> 60</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> 61<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 62<div class="section"> 63<h2><a name="purename" id="purename">IP �ּ� �Ѱ��� ���� �̸���� 64 ������Ʈ ��ϱ�.</a></h2> 65 66 <p>������ IP �ּҰ� �Ѱ� �ְ�, DNS���� ���� �ּ�(CNAMES)�� 67 �� ��ǻ�� ����Ų��. �� ��ǻ�Ϳ��� <code>www.example.com</code>�� 68 <code>www.example.org</code>�� �������� �����ϰ� �ʹ�.</p> 69 70 <div class="note"><h3>Note</h3><p>����ġ ������ ����ȣ��Ʈ ������ 71 �Ѵٰ� �� ȣ��Ʈ� ���� DNS ���� �ڵ��̷� ����� 72 �ʴ´�. <em>�ݵ��</em> DNS�� IP �ּҸ� ����Ű�� 73 �̸��� �־�� �Ѵ�. �ȱ��� �ƹ��� ������Ʈ�� �� 74 �� ���. �˻��غ��� ���� <code>hosts</code> ���Ͽ� ���� 75 �߰��� �� ������, �̴� hosts ���� ���� ��ǻ�Ϳ��� 76 �ݿ��ȴ�.</p> 77 </div> 78 79 <div class="example"><h3>���� ����</h3><p><code> 80 81 82 # ����ġ�� ��Ʈ 80�� ��ٸ���<br /> 83 Listen 80<br /> 84 <br /> 85 # ��� IP �ּҿ��� ����ȣ��Ʈ ��û�� ��ٸ���<br /> 86 NameVirtualHost *:80<br /> 87 <br /> 88 <VirtualHost *:80><br /> 89 <span class="indent"> 90 DocumentRoot /www/example1<br /> 91 ServerName www.example.com<br /> 92 <br /> 93 # �ٸ� ���þ�鵵 �ִ�<br /> 94 <br /> 95 </span> 96 </VirtualHost><br /> 97 <br /> 98 <VirtualHost *:80><br /> 99 <span class="indent"> 100 DocumentRoot /www/example2<br /> 101 ServerName www.example.org<br /> 102 <br /> 103 # �ٸ� ���þ�鵵 �ִ�<br /> 104 <br /> 105 </span> 106 </VirtualHost> 107 </code></p></div> 108 109 <p>��ǥ�� ��� �ּҸ� ����Ű�Ƿ�, �ּ����� � ��û�� 110 �������� �ʴ´�. <code>www.example.com</code>�� 111 �������Ͽ� ó������ �����Ƿ� ���� ���� �켱������ ������, 112 <cite>�⺻</cite>Ȥ�� <cite>�ʱ�</cite> ������ �ȴ�. 113 � <code>ServerName</code> ���þ�� �ش�����ʴ� ��û�� 114 ù��° <code>VirtualHost</code>�� �����Ѵ�.</p> 115 116 <div class="note"> 117 <h3>����</h3> 118 119 <p>���Ѵٸ� <code>*</code> ��� �ý����� ���� IP 120 �ּҸ� ����� �� �ִ�. �� ��� 121 <code>VirtualHost</code>�� �ƱԸ�Ʈ�� 122 <code>NameVirtualHost</code>�� �ƱԸ�Ʈ�� ��ġ�ؾ� 123 <em>�Ѵ�</em>:</p> 124 125 <div class="example"><p><code> 126 NameVirtualHost 172.20.30.40<br /> 127 <br /> 128 <VirtualHost 172.20.30.40><br /> 129 # �� ... 130 </code></p></div> 131 132 <p>���� ISP���� �������� IP �ּҸ� �������� �� 133 IP �ּҸ� �� ��쿡�� <code>*</code>�� ����ϴ� 134 ���� �����ϴ�. <code>*</code>�� ��� IP �ּҿ� 135 �ش��ϹǷ�, IP �ּҰ� ����Ǿ ������ ������ 136 �ʿ䰡 ���.</p> 137 </div> 138 139 <p>���� ��κ��� �̸���� ����ȣ��Ʈ ������ ���� ����. 140 ���ܴ� �ٸ� IP �ּҳ� ��Ʈ�� �ٸ� ������ �����Ϸ��� 141 ����̴�.</p> 142 143 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 144<div class="section"> 145<h2><a name="twoips" id="twoips">���� IP �ּҿ��� �̸���� 146 ȣ��Ʈ.</a></h2> 147 148 <div class="note"> 149 <h3>����</h3><p>���⼭ ������ ����� IP �ּҰ� 150 ��� ��밡���ϴ�.</p> 151 </div> 152 153 <p>������ IP �ּҰ� �ΰ��ִ�. �ϳ����� 154 (<code>172.20.30.40</code>) "��" ���� 155 <code>server.domain.com</code>�� �����ϰ�, �ٸ� �ϳ����� 156 (<code>172.20.30.50</code>) ���� ����ȣ��Ʈ�� ������ 157 ���̴�.</p> 158 159 <div class="example"><h3>���� ����</h3><p><code> 160 161 162 Listen 80<br /> 163 <br /> 164 # 172.20.30.40���� �����ϴ� "��"�����̴�<br /> 165 ServerName server.domain.com<br /> 166 DocumentRoot /www/mainserver<br /> 167 <br /> 168 # �ٸ� �ּҴ�<br /> 169 NameVirtualHost 172.20.30.50<br /> 170 <br /> 171 <VirtualHost 172.20.30.50><br /> 172 <span class="indent"> 173 DocumentRoot /www/example1<br /> 174 ServerName www.example.com<br /> 175 <br /> 176 # �ٸ� ���þ�鵵 �ִ� ...<br /> 177 <br /> 178 </span> 179 </VirtualHost><br /> 180 <br /> 181 <VirtualHost 172.20.30.50><br /> 182 <span class="indent"> 183 DocumentRoot /www/example2<br /> 184 ServerName www.example.org<br /> 185 <br /> 186 # �ٸ� ���þ�鵵 �ִ� ...<br /> 187 <br /> 188 </span> 189 </VirtualHost> 190 </code></p></div> 191 192 <p><code>172.20.30.50</code>�� �ƴ� �ּҿ� ���� ��û�� 193 �ּ����� �����Ѵ�. ȣ��Ʈ�� ����, �� <code>Host:</code> 194 ������� <code>172.20.30.50</code>�� ��û�ϸ� 195 <code>www.example.com</code>�� �����Ѵ�.</p> 196 197 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 198<div class="section"> 199<h2><a name="intraextra" id="intraextra">(���ο� �ܺ� �ּҿ� ����) 200 �ٸ� IP �ּҷ� ���� ������ �����ϱ�.</a></h2> 201 202 <p>���� ��ǻ�Ϳ� IP �ּҰ� �ΰ� (<code>192.168.1.1</code>�� 203 <code>172.20.30.40</code>) �ִ�. ��ǻ�ʹ� ���� (��Ʈ���) 204 ��Ʈ���� �ܺ� (���ͳ�) ��Ʈ�� ���̿� ��ġ�Ѵ�. ��Ʈ�� �ۿ��� 205 <code>server.example.com</code>�� �ܺ� �ּҸ� 206 (<code>172.20.30.40</code>) �ǹ��ϰ�, ��Ʈ�� ���ο��� ���� 207 �̸��� ���� �ּҷ� (<code>192.168.1.1</code>) ����Ѵ�.</p> 208 209 <p>������ <code>VirtualHost</code> ���� �Ѱ��� ���ο� �ܺ� 210 ���信 ���� ������ ������ �� �ִ�.</p> 211 212 <div class="example"><h3>���� ����</h3><p><code> 213 214 215 NameVirtualHost 192.168.1.1<br /> 216 NameVirtualHost 172.20.30.40<br /> 217 <br /> 218 <VirtualHost 192.168.1.1 172.20.30.40><br /> 219 <span class="indent"> 220 DocumentRoot /www/server1<br /> 221 ServerName server.example.com<br /> 222 ServerAlias server<br /> 223 </span> 224 </VirtualHost> 225 </code></p></div> 226 227 <p>���� �� ��Ʈ������ ���� ��û�� ���� 228 <code>VirtualHost</code>���� �����Ѵ�.</p> 229 230 <div class="note"> 231 <h3>����:</h3><p>���� ��Ʈ�������� ������ ȣ��Ʈ�� 232 <code>server.example.com</code> ��� �̸� 233 <code>server</code>�� �����ϴ�.</p> 234 235 <p>���� ���� ������ IP �ּ� ��� <code>*</code>�� 236 ����Ͽ� ������ ��� �ּҿ� �����ϰ� ������ �� 237 �ִ�.</p> 238 </div> 239 240 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 241<div class="section"> 242<h2><a name="port" id="port">���� ��Ʈ���� ���� �ٸ� ����Ʈ 243 ��ϱ�.</a></h2> 244 245 <p>���� IP�� ���� ��Ʈ���� ���� �ٸ� �������� �����Ѵٰ� 246 ��������. �̴� "NameVirtualHost" �±� ��Ʈ�� �����ϸ� 247 �����ϴ�. NameVirtualHost name:port���� <VirtualHost 248 name:port>�� Ȥ�� Listen ���þ ����ϸ� �ȵȴ�.</p> 249 250 <div class="example"><h3>���� ����</h3><p><code> 251 252 253 Listen 80<br /> 254 Listen 8080<br /> 255 <br /> 256 NameVirtualHost 172.20.30.40:80<br /> 257 NameVirtualHost 172.20.30.40:8080<br /> 258 <br /> 259 <VirtualHost 172.20.30.40:80><br /> 260 <span class="indent"> 261 ServerName www.example.com<br /> 262 DocumentRoot /www/domain-80<br /> 263 </span> 264 </VirtualHost><br /> 265 <br /> 266 <VirtualHost 172.20.30.40:8080><br /> 267 <span class="indent"> 268 ServerName www.example.com<br /> 269 DocumentRoot /www/domain-8080<br /> 270 </span> 271 </VirtualHost><br /> 272 <br /> 273 <VirtualHost 172.20.30.40:80><br /> 274 <span class="indent"> 275 ServerName www.example.org<br /> 276 DocumentRoot /www/otherdomain-80<br /> 277 </span> 278 </VirtualHost><br /> 279 <br /> 280 <VirtualHost 172.20.30.40:8080><br /> 281 <span class="indent"> 282 ServerName www.example.org<br /> 283 DocumentRoot /www/otherdomain-8080<br /> 284 </span> 285 </VirtualHost> 286 </code></p></div> 287 288 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 289<div class="section"> 290<h2><a name="ip" id="ip">IP��� ����ȣ��Ʈ</a></h2> 291 292 <p>������ ���� <code>www.example.com</code>�� 293 <code>www.example.org</code>�� �ش��ϴ� �� IP �ּҸ� 294 (<code>172.20.30.40</code>�� <code>172.20.30.50</code>) 295 �����.</p> 296 297 <div class="example"><h3>���� ����</h3><p><code> 298 299 300 Listen 80<br /> 301 <br /> 302 <VirtualHost 172.20.30.40><br /> 303 <span class="indent"> 304 DocumentRoot /www/example1<br /> 305 ServerName www.example.com<br /> 306 </span> 307 </VirtualHost><br /> 308 <br /> 309 <VirtualHost 172.20.30.50><br /> 310 <span class="indent"> 311 DocumentRoot /www/example2<br /> 312 ServerName www.example.org<br /> 313 </span> 314 </VirtualHost> 315 </code></p></div> 316 317 <p><code><VirtualHost></code> ���þ�� ������ �ּҿ� 318 �ش������ʴ� �ּҷ� (���� ���, <code>localhost</code>) 319 ��û�� ������ �ּ����� �ִ� ��� �ּ����� �����Ѵ�.</p> 320 321 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 322<div class="section"> 323<h2><a name="ipport" id="ipport">��Ʈ��ݰ� ip����� ȥ�յ� 324 ����ȣ��Ʈ</a></h2> 325 326 <p>������ ���� <code>www.example.com</code>�� 327 <code>www.example.org</code>�� �ش��ϴ� �� IP �ּҸ� 328 (<code>172.20.30.40</code>�� <code>172.20.30.50</code>) 329 �����. �� IP�� 80��� 8080�� ��Ʈ�� ����ȣ��Ʈ�� ������.</p> 330 331 <div class="example"><h3>���� ����</h3><p><code> 332 333 334 Listen 172.20.30.40:80<br /> 335 Listen 172.20.30.40:8080<br /> 336 Listen 172.20.30.50:80<br /> 337 Listen 172.20.30.50:8080<br /> 338 <br /> 339 <VirtualHost 172.20.30.40:80><br /> 340 <span class="indent"> 341 DocumentRoot /www/example1-80<br /> 342 ServerName www.example.com<br /> 343 </span> 344 </VirtualHost><br /> 345 <br /> 346 <VirtualHost 172.20.30.40:8080><br /> 347 <span class="indent"> 348 DocumentRoot /www/example1-8080<br /> 349 ServerName www.example.com<br /> 350 </span> 351 </VirtualHost><br /> 352 <br /> 353 <VirtualHost 172.20.30.50:80><br /> 354 <span class="indent"> 355 DocumentRoot /www/example2-80<br /> 356 ServerName www.example.org<br /> 357 </span> 358 </VirtualHost><br /> 359 <br /> 360 <VirtualHost 172.20.30.50:8080><br /> 361 <span class="indent"> 362 DocumentRoot /www/example2-8080<br /> 363 ServerName www.example.org<br /> 364 </span> 365 </VirtualHost> 366 </code></p></div> 367 368 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 369<div class="section"> 370<h2><a name="mixed" id="mixed">�̸���ݰ� IP����� ȥ�յ� 371 ����ȣ��Ʈ</a></h2> 372 373 <p>�ּ��� ����� �̸���� ����ȣ��Ʈ��, �ٸ� ���� IP��� 374 ����ȣ��Ʈ�� �����ϰ� �ʹ�.</p> 375 376 <div class="example"><h3>���� ����</h3><p><code> 377 378 379 Listen 80<br /> 380 <br /> 381 NameVirtualHost 172.20.30.40<br /> 382 <br /> 383 <VirtualHost 172.20.30.40><br /> 384 <span class="indent"> 385 DocumentRoot /www/example1<br /> 386 ServerName www.example.com<br /> 387 </span> 388 </VirtualHost><br /> 389 <br /> 390 <VirtualHost 172.20.30.40><br /> 391 <span class="indent"> 392 DocumentRoot /www/example2<br /> 393 ServerName www.example.org<br /> 394 </span> 395 </VirtualHost><br /> 396 <br /> 397 <VirtualHost 172.20.30.40><br /> 398 <span class="indent"> 399 DocumentRoot /www/example3<br /> 400 ServerName www.example3.net<br /> 401 </span> 402 </VirtualHost><br /> 403 <br /> 404 # IP-���<br /> 405 <VirtualHost 172.20.30.50><br /> 406 <span class="indent"> 407 DocumentRoot /www/example4<br /> 408 ServerName www.example4.edu<br /> 409 </span> 410 </VirtualHost><br /> 411 <br /> 412 <VirtualHost 172.20.30.60><br /> 413 <span class="indent"> 414 DocumentRoot /www/example5<br /> 415 ServerName www.example5.gov<br /> 416 </span> 417 </VirtualHost> 418 </code></p></div> 419 420 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 421<div class="section"> 422<h2><a name="default" id="default"><code>_default_</code> ����ȣ��Ʈ 423 ����ϱ�</a></h2> 424 425 <h3><a name="defaultallports" id="defaultallports">��� ��Ʈ�� ���� 426 <code>_default_</code> ����ȣ��Ʈ</a></h3> 427 428 <p>� ����ȣ��Ʈ���� �ش��������� IP �ּҿ� ��Ʈ�� ���� 429 <em>���</em> ��û�� ó���ϱ�.</p> 430 431 <div class="example"><h3>���� ����</h3><p><code> 432 433 434 <VirtualHost _default_:*><br /> 435 <span class="indent"> 436 DocumentRoot /www/default<br /> 437 </span> 438 </VirtualHost> 439 </code></p></div> 440 441 <p>default(�⺻) ����ȣ��Ʈ�� ��Ʈ�� ���ϵ�ī�带 ����Ͽ� � ��û�� 442 �ּ����� ���� �����.</p> 443 444 <p>default ����ȣ��Ʈ�� ���� �̸���� ����ȣ��Ʈ�� ����ϴ� 445 �ּ�/��Ʈ���� ��û�� �������� �ʴ´�. �� �� ��ų� 446 <code>Host:</code> ����� ��� ��û�� �� ������ �̸���� 447 ����ȣ��Ʈ(�������Ͽ��� 448 �ּ�/��Ʈ�� ó������ ���� ����ȣ��Ʈ)�� �����Ѵ�.</p> 449 450 <p><code class="directive"><a href="/mod/mod_alias.html#aliasmatch">AliasMatch</a></code>�� 451 <code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code>�� 452 ����Ͽ� � ��û�� Ư�� ������(Ȥ�� ��ũ��Ʈ)�� 453 ���ۼ���(rewrite) �� �ִ�.</p> 454 455 456 <h3><a name="defaultdifferentports" id="defaultdifferentports">���� ��Ʈ�� ���� 457 <code>_default_</code> ����ȣ��Ʈ</a></h3> 458 459 <p>���� ���� ������, ������ ���� ��Ʈ�� ��ٸ��� 80�� 460 ��Ʈ�� ���ؼ� �߰��� <code>_default_</code> ����ȣ��Ʈ�� 461 ����ϰ� �ʹ�.</p> 462 463 <div class="example"><h3>���� ����</h3><p><code> 464 465 466 <VirtualHost _default_:80><br /> 467 <span class="indent"> 468 DocumentRoot /www/default80<br /> 469 # ...<br /> 470 </span> 471 </VirtualHost><br /> 472 <br /> 473 <VirtualHost _default_:*><br /> 474 <span class="indent"> 475 DocumentRoot /www/default<br /> 476 # ...<br /> 477 </span> 478 </VirtualHost> 479 </code></p></div> 480 481 <p>80�� ��Ʈ�� ���� default ����ȣ��Ʈ�� (<em>�ݵ��</em> 482 ���ϵ�ī�� ��Ʈ�� ���� �⺻ ����ȣ��Ʈ ���� ���;� �Ѵ�) 483 ������������ IP �ּҷ� ������ ��� ��û�� �����Ѵ�. 484 �ּ����� ���� ��û�� �������� ���Ѵ�.</p> 485 486 487 <h3><a name="defaultoneport" id="defaultoneport">�� ��Ʈ�� ���� 488 <code>_default_</code> ����ȣ��Ʈ</a></h3> 489 490 <p>80�� ��Ʈ�� ���ؼ��� default ����ȣ��Ʈ�� ����� �ʹ�.</p> 491 492 <div class="example"><h3>���� ����</h3><p><code> 493 494 495 <VirtualHost _default_:80><br /> 496 DocumentRoot /www/default<br /> 497 ...<br /> 498 </VirtualHost> 499 </code></p></div> 500 501 <p>��Ʈ 80�� ������������ �ּҿ� ���� ��û�� �⺻ 502 ����ȣ��Ʈ�� �����ϰ�, �ٸ� ������������ �ּҿ� ��Ʈ�� 503 ���� ��û�� �� ������ �����Ѵ�.</p> 504 505 506 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 507<div class="section"> 508<h2><a name="migrate" id="migrate">�̸���� ����ȣ��Ʈ�� IP��� 509 ����ȣ��Ʈ�� �ű��</a></h2> 510 511 <p>(<a href="#name">�̸����</a>�� ù��° ������) ȣ��Ʈ�� 512 <code>www.example.org</code>�� ���� �̸���� ����ȣ��Ʈ�� 513 �ڽ��� IP �ּҸ� ������ �Ѵ�. �̸���� ����ȣ��Ʈ�� ���� 514 IP �ּҸ� ij���ϴ� ���Ӽ����� ���Ͻÿ��� ������ ���ϱ����� 515 �ű�� ���� �� ��θ� �����ϰ� �ʹ�.</p> 516 517 <p> 518 ����� <code>VirtualHost</code> ���þ �� IP �ּҸ��� 519 (<code>172.20.30.50</code>) �߰��ϸ�ǹǷ� ����.</p> 520 521 <div class="example"><h3>���� ����</h3><p><code> 522 523 524 Listen 80<br /> 525 ServerName www.example.com<br /> 526 DocumentRoot /www/example1<br /> 527 <br /> 528 NameVirtualHost 172.20.30.40<br /> 529 <br /> 530 <VirtualHost 172.20.30.40 172.20.30.50><br /> 531 <span class="indent"> 532 DocumentRoot /www/example2<br /> 533 ServerName www.example.org<br /> 534 # ...<br /> 535 </span> 536 </VirtualHost><br /> 537 <br /> 538 <VirtualHost 172.20.30.40><br /> 539 <span class="indent"> 540 DocumentRoot /www/example3<br /> 541 ServerName www.example.net<br /> 542 ServerAlias *.example.net<br /> 543 # ...<br /> 544 </span> 545 </VirtualHost> 546 </code></p></div> 547 548 <p>���� (IP��� ����ȣ��Ʈ�� ����) ���ο� �ּҿ� (�̸���� 549 ����ȣ��Ʈ�� ����) ���� �ּ� ��� ����ȣ��Ʈ�� ������ 550 �� �ִ�.</p> 551 552 </div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 553<div class="section"> 554<h2><a name="serverpath" id="serverpath"><code>ServerPath</code> 555 ���þ� ����ϱ�</a></h2> 556 557 <p>�� �̸���� ����ȣ��Ʈ�� ���� ������ �ִ�. �ùٸ� 558 ����ȣ��Ʈ�� �����ϱ����� Ŭ���̾�Ʈ�� �ùٸ� 559 <code>Host:</code> ����� ������ �Ѵ�. ������ HTTP/1.0 560 Ŭ���̾�Ʈ�� �� ����� ������ ���ϸ� ����ġ�� Ŭ���̾�Ʈ�� 561 � ����ȣ��Ʈ�� �������ϴ��� �� �� ��� (���� ������ 562 ����ȣ��Ʈ�� ��û�� �����Ѵ�). ������ ������� ������ ȣȯ�� 563 �����ϱ����� ������ ����ȣ��Ʈ�� �����, ��� �̸���� 564 ����ȣ��Ʈ�� URL ���λ縦 �����ϴ� ��ũ ��� �������� 565 �д�.</p> 566 567 <div class="example"><h3>���� ����</h3><p><code> 568 569 570 NameVirtualHost 172.20.30.40<br /> 571 <br /> 572 <VirtualHost 172.20.30.40><br /> 573 <span class="indent"> 574 # primary vhost<br /> 575 DocumentRoot /www/subdomain<br /> 576 RewriteEngine On<br /> 577 RewriteRule ^/.* /www/subdomain/index.html<br /> 578 # ...<br /> 579 </span> 580 </VirtualHost><br /> 581 <br /> 582 <VirtualHost 172.20.30.40><br /> 583 DocumentRoot /www/subdomain/sub1<br /> 584 <span class="indent"> 585 ServerName www.sub1.domain.tld<br /> 586 ServerPath /sub1/<br /> 587 RewriteEngine On<br /> 588 RewriteRule ^(/sub1/.*) /www/subdomain$1<br /> 589 # ...<br /> 590 </span> 591 </VirtualHost><br /> 592 <br /> 593 <VirtualHost 172.20.30.40><br /> 594 <span class="indent"> 595 DocumentRoot /www/subdomain/sub2<br /> 596 ServerName www.sub2.domain.tld<br /> 597 ServerPath /sub2/<br /> 598 RewriteEngine On<br /> 599 RewriteRule ^(/sub2/.*) /www/subdomain$1<br /> 600 # ...<br /> 601 </span> 602 </VirtualHost> 603 </code></p></div> 604 605 <p><code class="directive"><a href="/mod/core.html#serverpath">ServerPath</a></code> ���þ���� 606 URL <code>http://www.sub1.domain.tld/sub1/</code>�� ���� 607 ��û�� <em>��</em> subl-����ȣ��Ʈ�� �����Ѵ�.<br /> 608 Ŭ���̾�Ʈ�� �ùٸ� <code>Host:</code> ����� �����ٸ�, 609 URL <code>http://www.sub1.domain.tld/</code>�� ���� ��û�� 610 subl-����ȣ��Ʈ������ �����Ѵ�. ���� <code>Host:</code> ����� 611 ������������ Ŭ���̾�Ʈ�� ������ ȣ��Ʈ�� �ִ� ������������ 612 ���Եȴ�.</p> 613 614 <p>��� ������ ������ �����϶�: Ŭ���̾�Ʈ�� 615 <code>Host:</code> ����� ������������ 616 <code>http://www.sub2.domain.tld/sub1/</code>�� ���� ��û�� 617 subl-����ȣ��Ʈ�� �����Ѵ�.</p> 618 619 <p><code class="directive"><a href="/mod/mod_rewrite.html#rewriterule">RewriteRule</a></code> 620 ���þ ����Ͽ� �ùٸ� <code>Host:</code> ����� ������ 621 Ŭ���̾�Ʈ�� (<em>���� ���</em>, URL ��ġ�簡 �ְų� ���) 622 �� URL�� ��� ����� �� �ִ�.</p> 623 624 </div></div> 625<div class="bottomlang"> 626<p><span>������ ���: </span><a href="/en/vhosts/examples.html" hreflang="en" rel="alternate" title="English"> en </a> | 627<a href="/fr/vhosts/examples.html" hreflang="fr" rel="alternate" title="Français"> fr </a> | 628<a href="/ja/vhosts/examples.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | 629<a href="/ko/vhosts/examples.html" title="Korean"> ko </a> | 630<a href="/tr/vhosts/examples.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 631</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 632<script type="text/javascript"><!--//--><![CDATA[//><!-- 633var comments_shortname = 'httpd'; 634var comments_identifier = 'http://httpd.apache.org/docs/2.2/vhosts/examples.html'; 635(function(w, d) { 636 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 637 d.write('<div id="comments_thread"><\/div>'); 638 var s = d.createElement('script'); 639 s.type = 'text/javascript'; 640 s.async = true; 641 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 642 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 643 } 644 else { 645 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 646 } 647})(window, document); 648//--><!]]></script></div><div id="footer"> 649<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> 650<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 651if (typeof(prettyPrint) !== 'undefined') { 652 prettyPrint(); 653} 654//--><!]]></script> 655</body></html>