<?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>주소와 포트 지정 (Binding) - Apache HTTP Server Version 2.4</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 rel="stylesheet" type="text/css" href="./style/css/prettify.css" />
<script src="./style/scripts/prettify.min.js" type="text/javascript">
</script>
<link href="./images/favicon.ico" rel="shortcut icon" /></head>
<body id="manual-page"><div id="page-header">
<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>
<p class="apache">Apache HTTP Server Version 2.4</p>
<img alt="" src="./images/feather.png" /></div>
<div class="up"><a href="./"><img title="<-" alt="<-" src="./images/left.gif" /></a></div>
<div id="path">
<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.4</a></div><div id="page-content"><div id="preamble"><h1>주소와 포트 지정 (Binding)</h1>
<div class="toplang">
<p><span>가능한 언어: </span><a href="./de/bind.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<a href="./en/bind.html" hreflang="en" rel="alternate" title="English"> en </a> |
<a href="./fr/bind.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
<a href="./ja/bind.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="./ko/bind.html" title="Korean"> ko </a> |
<a href="./tr/bind.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
</div>
<div class="outofdate">이 문서는 최신판 번역이 아닙니다.
최근에 변경된 내용은 영어 문서를 참고하세요.</div>
<p>아파치가 특정 주소와 포트에서 서비스하도록 설정하기.</p>
</div>
<div id="quickview"><a href="https://www.apache.org/foundation/contributing.html" class="badge"><img src="https://www.apache.org/images/SupportApache-small.png" alt="Support Apache!" /></a><ul id="toc"><li><img alt="" src="./images/down.gif" /> <a href="#overview">개요</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#ipv6">IPv6에서 특별히 고려할 점</a></li>
<li><img alt="" src="./images/down.gif" /> <a href="#virtualhost">가상호스트와 어떻게 연관되나</a></li>
</ul><h3>참고</h3><ul class="seealso"><li><a href="vhosts/">가상호스트</a></li><li><a href="dns-caveats.html">DNS 문제</a></li><li><a href="#comments_section">Comments</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="overview" id="overview">개요</a></h2>
<table class="related"><tr><th>관련된 모듈</th><th>관련된 지시어</th></tr><tr><td><ul><li><code class="module"><a href="./mod/core.html">core</a></code></li><li><code class="module"><a href="./mod/mpm_common.html">mpm_common</a></code></li></ul></td><td><ul><li><code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code></li><li><code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code></li></ul></td></tr></table>
<p>아파치를 시작하면 아파치는 컴퓨터의 어떤 포트와 주소에
연결하여, 들어오는 요청을 기다린다. 기본적으로 아파치는
컴퓨터의 모든 주소에서 기다린다. 그러나 아파치가 특정 포트나
선택한 주소만을 기다리게 해야할 경우가 있다. 또 이 문제는
아파치가 어떻게 다른 IP 주소, 호스트명, 포트에 반응할지를
결정하는 가상호스트 기능과도 관련되있다.</p>
<p><code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code> 지시어는
서버가 특정 포트나 주소와 포트 조합에서만 요청을 받게
한다. <code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code>
지시어에 포트 번호만 지정하면, 서버는 모든 인터페이스에서
지정한 포트를 기다린다. 여러 <code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code> 지시어로 기다릴 여러
주소와 포트를 지정할 수도 있다. 서버는 열거한 주소와 포트로
요청이 들어오면 응답한다.</p>
<p>예를 들어, 서버가 80번과 8000번 포트 모두에서 연결을
받도록 하려면:</p>
<div class="example"><p><code>
Listen 80<br />
Listen 8000
</code></p></div>
<p>서버가 지정한 두 인터페이스와 포트에서 연결을 기다리도록
하려면,</p>
<div class="example"><p><code>
Listen 192.0.2.1:80<br />
Listen 192.0.2.5:8000
</code></p></div>
<p>IPv6 주소는 다음과 같이 대괄호로 묶어야 한다:</p>
<div class="example"><p><code>
Listen [2001:db8::a00:20ff:fea7:ccea]:80
</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="ipv6" id="ipv6">IPv6에서 특별히 고려할 점</a></h2>
<p>IPv6를 구현한 플래폼이 늘고 있고 APR이 이들 플래폼 대부분에서
IPv6를 지원하기때문에, 아파치는 IPv6 소켓을 할당하여 IPv6로
받은 요청을 처리할 수 있다.</p>
<p>아파치 관리자에게 복잡한 부분은 IPv6 소켓이 IPv4 연결과
IPv6 연결을 모두 처리할 수 있느냐는 점이다. 대부분의 플래폼에서는
IPv4-대응(mapped) IPv6 주소를 사용하여 IPv6 소켓에서 IPv4
연결을 받지만, FreeBSD와 NetBSD와 OpenBSD은 시스템전체 정책때문에
기본적으로 허용하지 않는다. 그러나 기본적으로 허용하지않는
시스템이라도 아파치를 위해 특별한 설정 파라미터로 변경할
수 있다.</p>
<p>반면 리눅스와 Tru64 같은 일부 플래폼에서 IPv4와 IPv6을
모두 처리하려면 대응 주소를 <strong>사용해야만</strong>
한다. 아파치가 최소한의 소켓을 사용하여 IPv4 연결과 IPv6
연결을 모두 받도록하려면, IPv4-대응 IPv6 주소를 사용하고
<a href="programs/configure.html">configure</a> 옵션
<code>--enable-v4-mapped</code>를 지정한다.</p>
<p><code>--enable-v4-mapped</code>는 FreeBSD, NetBSD, OpenBSD를
제외한 모든 플래폼에서 기본값이고, 아마도 당신의 아파치도
마찬가지일 것이다.</p>
<p>플래폼과 APR의 지원여부와 관계없이 아파치가 IPv4 연결만을
받도록하려면, 다음 예제와 같이 모든 <code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code> 지시어에 IPv4 주소를
사용한다:</p>
<div class="example"><p><code>
Listen 0.0.0.0:80<br />
Listen 192.0.2.1:80
</code></p></div>
<p>플래폼에서 지원하며 아파치가 서로 다른 소켓으로 IPv4
연결과 IPv6 연결을 받도록하려면 (즉 IPv4-대응 주소를 사용하지
않으려면), <a href="programs/configure.html">configure</a>
옵션 <code>--disable-v4-mapped</code>를
지정한다. <code>--disable-v4-mapped</code>는 FreeBSD, NetBSD,
OpenBSD에서 기본값이다.</p>
</div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
<div class="section">
<h2><a name="virtualhost" id="virtualhost">가상호스트와 어떻게 연관되나</a></h2>
<p><code class="directive"><a href="./mod/mpm_common.html#listen">Listen</a></code>은
가상호스트를 만들지 않는다. 이는 단지 주서버가
어떤 주소와 포트를 기다릴지만 알려준다. <code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code> 지시어를
사용하지 않으면, 서버는 받은 모든 요청을 똑같이 처리한다.
그러나 <code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code>로 여러 주소와 포트에
대해 다른 행동을 지정할 수 있다. 가상호스트를 만들려면
먼저 서버에게 사용할 주소와 포트를 알려줘야 한다. 그리고
특정 주소와 포트에 대한 가상호스트의 행동을 지정할
<code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code>
섹션이 필요하다. 주서버가 기다리지않는 주소와 포트를 사용하는
<code class="directive"><a href="./mod/core.html#virtualhost"><VirtualHost></a></code>는
접근할 수 없음을 주의하라.</p>
</div></div>
<div class="bottomlang">
<p><span>가능한 언어: </span><a href="./de/bind.html" hreflang="de" rel="alternate" title="Deutsch"> de </a> |
<a href="./en/bind.html" hreflang="en" rel="alternate" title="English"> en </a> |
<a href="./fr/bind.html" hreflang="fr" rel="alternate" title="Français"> fr </a> |
<a href="./ja/bind.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="./ko/bind.html" title="Korean"> ko </a> |
<a href="./tr/bind.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p>
</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>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var comments_shortname = 'httpd';
var comments_identifier = 'http://httpd.apache.org/docs/2.4/bind.html';
(function(w, d) {
if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
d.write('<div id="comments_thread"><\/div>');
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
(d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
}
else {
d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
}
})(window, document);
//--><!]]></script></div><div id="footer">
<p class="apache">Copyright 2018 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="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[//><!--
if (typeof(prettyPrint) !== 'undefined') {
prettyPrint();
}
//--><!]]></script>
</body></html>