1
0
mirror of https://github.com/apache/httpd.git synced 2025-05-30 01:07:09 +03:00
apache/docs/manual/mod/mod_authz_host.xml.ko
André Malo ef27013c2f update revision references
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@421136 13f79535-47bb-0310-9956-ffa450edef68
2006-07-12 05:37:53 +00:00

314 lines
12 KiB
XML

<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
<!-- English Revision: 151408:420990 (outdated) -->
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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.
-->
<modulesynopsis metafile="mod_authz_host.xml.meta">
<name>mod_authz_host</name>
<description>호스트 (이름이나 IP 주소)를 사용한 그룹 권한부여</description>
<status>Base</status>
<sourcefile>mod_authz_host.c</sourcefile>
<identifier>authz_host_module</identifier>
<compatibility>아파치 2.1 이후부터</compatibility>
<summary>
<p><directive module="core" type="section">Directory</directive>,
<directive module="core" type="section">Files</directive>,
<directive module="core" type="section">Location</directive>
섹션과 <code><a href="core.html#accessfilename">.htaccess</a></code>
파일에서 서버의 특정 부분의 접근을 제어하기위해
<module>mod_authz_host</module>가 제공하는 지시어를 사용한다.
클라이언트의 호스트명, IP 주소, <a
href="../env.html">환경변수</a>에 기록된 요청의 특성에 따라
접근을 제어한다. <directive
module="mod_authz_host">Allow</directive><directive
module="mod_authz_host">Deny</directive> 지시어는 어떤
클라이언트가 서버에 접근할 수 있는지를 지시하고, <directive
module="mod_authz_host">Order</directive> 지시어는 기본적으로
접근을 허용할지 거부할지 여부와 어떻게 <directive
module="mod_authz_host">Allow</directive> 지시어와 <directive
module="mod_authz_host">Deny</directive> 지시어가 서로 영향을
미치는지 결정한다.</p>
<p>호스트기반 접근제한과 암호기반 인증을 동시에 사용할 수도
있다. 이 경우 <directive module="core">Satisfy</directive>
지시어를 사용하여 어떻게 두 제한이 서로 영향을 미치는지
결정한다.</p>
<p>일반적으로 접근제한 지시어는 (<code>GET</code>,
<code>PUT</code>, <code>POST</code> 등) 모든 메서드에 적용되며,
이 행동은 대부분의 경우 바람직하다. 그러나 <directive
module="core" type="section">Limit</directive> 섹션안에
지시어를 사용하여 특정 메서드에만 제한할 수 있다.</p>
</summary>
<seealso><directive module="core">Satisfy</directive></seealso>
<seealso><directive module="core">Require</directive></seealso>
<directivesynopsis>
<name>Allow</name>
<description>서버의 일부에 접근할 수 있는 호스트를 지정한다</description>
<syntax> Allow from all|<var>host</var>|env=<var>env-variable</var>
[<var>host</var>|env=<var>env-variable</var>] ...</syntax>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>Limit</override>
<usage>
<p><directive>Allow</directive> 지시어는 어떤 호스트가 서버의
일부에 접근할 수 있는지 지시한다. 호스트명, IP 주소, IP
주소영역, 환경변수에 기록된 다른 특성에 따라 접근을 조절할
수 있다.</p>
<p>이 지시어의 첫번째 아규먼트는 항상 <code>from</code>이다.
다음 아규먼트에는 세가지 형식이 있다. <code>Allow from all</code>
사용하면, 아래에서 설명할 <directive
module="mod_authz_host">Deny</directive><directive
module="mod_authz_host">Order</directive> 지시어 설정에
따라 모든 호스트의 접근을 허가한다. 특정 호스트만 서버로
접근을 허용하려면 다음과 같은 형식으로 <em>host</em>를 지시할
수 있다:</p>
<dl>
<dt>호스트명 (일부)</dt>
<dd>
<example><title>예제:</title>
Allow from apache.org
</example>
<p>호스트명이 이 문자열과 같거나 이 문자열로 끝나면 접근을
허용한다. 그래서 이 경우 <code>foo.apache.org</code>
해당되고, <code>fooapache.org</code>는 해당되지 않는다.
이 설정을 사용하면 아파치는 <directive
module="core">HostnameLookups</directive> 지시어 설정과
관계없이 클라이언트 IP 주소를 가지고 중복-역 DNS 검색을
한다. 즉, 호스트명을 찾기위해 IP 주소를 역DNS 검색을 한
후, 다시 호스트명으로 검색하여 원래 IP 주소와 일치하는지
확인한다. 결과가 같고 호스트명이 설정값에 해당하면, 접근을
허용한다.</p></dd>
<dt>IP 주소 전체</dt>
<dd>
<example><title>예제:</title>
Allow from 10.1.2.3
</example>
<p>접근을 허가하는 호스트의 IP 주소</p></dd>
<dt>IP 주소 일부</dt>
<dd>
<example><title>예제:</title>
Allow from 10.1
</example>
<p>서브네트워크로 제한하기위해 IP 주소 앞의 1에서 3
바이트.</p></dd>
<dt>네트워크/넷매스크 쌍</dt>
<dd>
<example><title>예제:</title>
Allow from 10.1.0.0/255.255.0.0
</example>
<p>네트워크 a.b.c.d와 넷매스크 w.x.y.z. 더 세밀하게
서브네트워크로 제한할때 사용한다.</p></dd>
<dt>네트워크/nnn CIDR 규약</dt>
<dd>
<example><title>예제:</title>
Allow from 10.1.0.0/16
</example>
<p>앞의 경우와 같지만, 상위 nnn개 비트 값이 1인 넷매스크를
사용한다.</p></dd>
</dl>
<p>마지막 세가지 예는 정확히 동일한 호스트들을 지칭한다.</p>
<p>다음과 같이 IPv6 주소와 IPv6 서브네트워크를 지정할 수도
있다:</p>
<example>
Allow from 2001:db8::a00:20ff:fea7:ccea<br />
Allow from 2001:db8::a00:20ff:fea7:ccea/10
</example>
<p><directive>Allow</directive> 지시어 아규먼트의 세번째
형식은 <a href="../env.html">환경변수</a> 유무에 따라 접근을
제어한다. <code>Allow from env=<var>env-variable</var></code>
사용하면, <var>env-variable</var> 환경변수가 정의된 경우
접근을 허가한다. <module>mod_setenvif</module>가 제공하는
지시어를 사용하여 클라이언트 요청의 특성에 따라 자유롭게
환경변수를 설정할 수 있다. 그러므로 이 지시어를 사용하여
클라이언트 <code>User-Agent</code> (브라우저 종류),
<code>Referer</code>, 다른 HTTP 요청 헤더에 따라 접근을
허가할 수 있다.</p>
<example><title>예제:</title>
SetEnvIf User-Agent ^KnockKnock/2\.0 let_me_in<br />
&lt;Directory /docroot&gt;<br />
<indent>
Order Deny,Allow<br />
Deny from all<br />
Allow from env=let_me_in<br />
</indent>
&lt;/Directory&gt;
</example>
<p>이 경우 user-agent 문자열이 <code>KnockKnock/2.0</code>으로
시작하는 브라우저의 접근은 허용하고, 나머지는 모두 거부한다.</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>Deny</name>
<description>서버 접근을 거부할 호스트를 지정한다</description>
<syntax> Deny from all|<var>host</var>|env=<var>env-variable</var>
[<var>host</var>|env=<var>env-variable</var>] ...</syntax>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>Limit</override>
<usage>
<p>이 지시어를 사용하여 호스트명, IP 주소, 환경변수에 따라
서버 접근을 제한할 수 있다. <directive>Deny</directive>
지시어의 아규먼트는 <directive
module="mod_authz_host">Allow</directive> 지시어와 동일하다.</p>
</usage>
</directivesynopsis>
<directivesynopsis>
<name>Order</name>
<description>기본적으로 접근을 허용할지 거부할지 여부와
<directive>Allow</directive><directive>Deny</directive>
처리순서를 정한다.</description>
<syntax> Order <var>ordering</var></syntax>
<default>Order Deny,Allow</default>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>Limit</override>
<usage>
<p><directive>Order</directive> 지시어는 기본적으로 접근을
허용할지 거부할지 여부와 <directive
module="mod_authz_host">Allow</directive><directive
module="mod_authz_host">Deny</directive> 지시어 처리순서를
정한다. <var>ordering</var>은 다음 중 하나이다</p>
<dl>
<dt><code>Deny,Allow</code></dt>
<dd><directive module="mod_authz_host">Deny</directive>
지시어를 <directive module="mod_authz_host">Allow</directive>
지시어 보다 먼저 살펴본다. 그리고 기본적으로 접근을 허용한다.
<directive module="mod_authz_host">Deny</directive>
<directive module="mod_authz_host">Allow</directive> 지시어에
해당되지 않는 클라이언트의 접근을 허용한다.</dd>
<dt><code>Allow,Deny</code></dt>
<dd><directive module="mod_authz_host">Allow</directive>
지시어를 <directive
module="mod_authz_host">Deny</directive> 지시어 보다 먼저
살펴본다. 그리고 기본적으로 접근을 허용하지 않는다.
<directive module="mod_authz_host">Deny</directive>
<directive module="mod_authz_host">Allow</directive> 지시어에
해당되지 않는 클라이언트의 접근을 거부한다.</dd>
<dt><code>Mutual-failure</code></dt>
<dd><directive module="mod_authz_host">Deny</directive>
목록에는 안나오고 <directive
module="mod_authz_host">Allow</directive> 목록에만 나오는
호스트만 접근을 허용한다. <code>Order Allow,Deny</code>
같은 일을 하기때문에 사용하지 않는다.</dd>
</dl>
<p>키워드는 쉼표로만 구분한다; 사이에 <em>공백이 있으면
안된다.</em> 모든 경우 <directive
module="mod_authz_host">Allow</directive><directive
module="mod_authz_host">Deny</directive> 모두 살펴봄을
명심하라.</p>
<p>아래 예에서 apache.org 도메인의 모든 호스트의 접근은
허용하지만, 다른 호스트는 모두 거부한다.</p>
<example>
Order Deny,Allow<br />
Deny from all<br />
Allow from apache.org
</example>
<p>아래 예에서 foo.apache.org 하위도메인에 있는 호스트만
거부하고, apache.org 도메인에 있는 호스트는 모두 접근을
허용한다. 기본적으로 접근을 거부하기때문에 apache.org 도메인에
속하지 않는 호스트는 접근을 거부한다.</p>
<example>
Order Allow,Deny<br />
Allow from apache.org<br />
Deny from foo.apache.org
</example>
<p>반대로 위의 <directive>Order</directive>
<code>Deny,Allow</code>로 변경하면, 모든 호스트의 접근을
허용한다. 설정파일에서 지시어가 나오는 순서와 관계없이
<code>Allow from apache.org</code>를 제일 마지막에 처리하여
<code>Deny from foo.apache.org</code>의 효과를 무시하기
때문이다. 또, 기본적으로 접근을 <em>허가</em>하므로
<code>apache.org</code> 도메인에 속하지 않는 호스트도 모두
접근을 허가한다.</p>
<p><directive>Order</directive> 지시어는 기본적으로 접근을
허용할지 거부할지를 정하기때문에 <directive
module="mod_authz_host">Allow</directive><directive
module="mod_authz_host">Deny</directive> 지시어를 사용하지
않아도 접근가능 여부에 영향을 준다. 예를 들어,</p>
<example>
&lt;Directory /www&gt;<br />
<indent>
Order Allow,Deny<br />
</indent>
&lt;/Directory&gt;
</example>
<p>는 기본적으로 접근을 <em>거부</em>하기때문에
<code>/www</code> 디렉토리에 대한 모든 접근을 거부한다.</p>
<p><directive>Order</directive> 지시어가 정하는 접근 지시어
처리순서는 해당 서버설정 처리단계에만 영향을 준다. 즉,
<directive>Order</directive> 지시어 설정과 관계없이 <directive
module="core" type="section">Location</directive> 섹션 안에
있는 <directive module="mod_authz_host">Allow</directive>
<directive module="mod_authz_host">Deny</directive> 지시어는
<directive module="core" type="section">Directory</directive>
섹션이나 <code>.htaccess</code> 파일에 있는 <directive
module="mod_authz_host">Allow</directive><directive
module="mod_authz_host">Deny</directive> 지시어를 모두 처리한
후에 처리한다. 설정 섹션들이 결합하는 방법에 대해서는 <a
href="../sections.html">어떻게 Directory, Location, Files
섹션이 동작하나</a> 문서를 참고하라.</p>
</usage>
</directivesynopsis>
</modulesynopsis>