sections.xml.ko revision c3c006c28c5b03892ccaef6e4d2cbb15a13a2072
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="/style/manual.ko.xsl"?>
<!-- English Revision: 105989:1330883 (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.
-->
<manualpage metafile="sections.xml.meta">
<title>���� ����</title>
<summary> <p><a href="configuring.html">��������</a>�� �ִ�
���þ�� ���� ��ü�� ���ǰų�, Ư�� ���丮, ����, ȣ��Ʈ,
URL���� ���� �� �ִ�. �� ������ �ٸ� ���þ��� ��������
�����ϱ����� ���� �����̳� <code>.htaccess</code> ������
����ϴ� ����� �����Ѵ�.</p>
</summary>
<section id="types"><title>���� ������ ����</title>
<related>
<modulelist>
<module>core</module>
<module>mod_proxy</module>
</modulelist>
<directivelist>
<directive type="section" module="core">Directory</directive>
<directive type="section" module="core">DirectoryMatch</directive>
<directive type="section" module="core">Files</directive>
<directive type="section" module="core">FilesMatch</directive>
<directive type="section" module="core">IfDefine</directive>
<directive type="section" module="core">IfModule</directive>
<directive type="section" module="core">Location</directive>
<directive type="section" module="core">LocationMatch</directive>
<directive type="section" module="mod_proxy">Proxy</directive>
<directive type="section" module="mod_proxy">ProxyMatch</directive>
<directive type="section" module="core">VirtualHost</directive>
</directivelist>
</related>
<p>���ǿ��� �ΰ��� ���� �ִ�. ��κ��� �ſ�û���� ó���ȴ�.
�ش��ϴ� ��û���� �ȿ� ������ ���þ ����Ѵ�. �ݴ��, <directive
type="section" module="core">IfDefine</directive>�� <directive
type="section" module="core">IfModule</directive>�� ������
�����Ҷ��� ���� ó���Ѵ�. �����Ҷ� ���°� ���̸� �ȿ� �ִ�
���þ ��� ��û�� ���ȴ�. ���� �ƴϸ� �ȿ� �ִ� ���þ��
�����Ѵ�.</p>
<p><directive type="section" module="core">IfDefine</directive>
���þ�� <code>httpd</code> ����࿡ ������ �Ķ���Ͱ� �ִ�
��쿡�� �ȿ� ������ ���þ ����Ѵ�. ���� ������ ���� ���,
������ <code>httpd -DClosedForNow</code>�� ������ ��쿡��
��� ��û�� �ٸ� ����Ʈ�� �����̷��ǵȴ�:</p>
<example>
&lt;IfDefine ClosedForNow&gt;<br />
Redirect / http://otherserver.example.com/<br />
&lt;/IfDefine&gt;
</example>
<p><directive type="section" module="core">IfModule</directive>
���þ Ư�� ����� ������ ���Ե� ��쿡�� �ȿ� �� ���þ
����Ѵٴ� ���� �����ϰ�� �ſ� ����ϴ�. ����� ������ ��������
�������ϰų� �������� ���������� �������� �տ� <directive
module="mod_so">LoadModule</directive> ���� �־�� �Ѵ�. ��
���þ�� Ư�� ����� ��ġ������ ��� ���������� �ٸ� �ʿ䰡
�������� ����ؾ� �Ѵ�. ����� ��� ��� ������ ������ ����������
�� �ֱ� ������ ������ ����ϱ� ���ϴ� ���þ �ȿ� �θ� �ȵȴ�.</p>
<p>���� ������ <module>mod_mime_magic</module>�� �������� <directive
module="mod_mime_magic">MimeMagicFiles</directive> ���þ
ó���Ѵ�.</p>
<example>
&lt;IfModule mod_mime_magic.c&gt;<br />
MimeMagicFile conf/magic<br />
&lt;/IfModule&gt;
</example>
<p><directive type="section" module="core">IfDefine</directive>��
<directive type="section" module="core">IfModule</directive>��
�˻� �տ� "!"�� �ٿ� ������ ������ �� �� �ִ�. ��, ���� ���ǵ���
���ļ� ����Ͽ� �� ������ ȿ�� ���� �� �ִ�.</p>
</section>
<section id="file-and-web"><title>���Ͻý��۰� ����</title>
<p>���� ���� ���Ǵ� ���� ������ ���Ͻý��۰� ����(webspace)��
Ư�� ��ҿ� ���� ������ �����ϴ� �͵��̴�. ���� �� ���� ���̸�
�����ϴ� ���� �߿��ϴ�. ���Ͻý����� �ü�� ���忡�� ��ũ��
���� �����̴�. ���� ���, �⺻������ ����ġ�� ��ġ�� �ϸ� ���н�
���Ͻý����� ��� <code>/usr/local/apache2</code>, ��������
���Ͻý����� ��� <code>"c:/Program Files/Apache
Group/Apache2"</code>�� ��ġ�ȴ�. (����ġ�� ��������� ����
�׻�, ���������� �ƴ�, �������� ������� �����϶�.) �ݴ��
������ �������� �����ϰ� Ŭ���̾�Ʈ�� ���Ե� ����Ʈ�� �����̴�.
�׷��� ���н����� �⺻ ����ġ ��ġ�� �� ��� ������� ���
<code>/dir/</code>�� ���Ͻý��� ���
<code>/usr/local/apache2/htdocs/dir/</code>�� �ش��Ѵ�. ������
����Ÿ���̽� ��� �������� ��� �� �ֱ⶧���� �ݵ��
���Ͻý��ۿ� ���� ������ �ʿ�� ���.</p>
<section id="filesystem"><title>���Ͻý��� ����</title>
<p><directive type="section" module="core">Directory</directive>��
<directive type="section" module="core">Files</directive> ���þ��
����ǥ������ ����ϴ� ���þ�� ���Ͻý����� Ư�� �κп� ���þ
����Ѵ�. <directive type="section"
module="core">Directory</directive> ���þ ���Ե� ���þ����
������ ���Ͻý��� ���丮�� �� ���� ���丮�� ���ȴ�. <a
href="howto/htaccess.html">.htaccess ����</a>�� ����ص� ����
����. ���� ������ ���� ���, ���丮 ���(index)��
<code>/var/web/dir1</code> ���� ���丮���� ���丮 ���(index)��
�����ϴ�.</p>
<example>
&lt;Directory /var/web/dir1&gt;<br />
Options +Indexes<br />
&lt;/Directory&gt;
</example>
<p><directive type="section"
module="core">Files</directive> ���ǿ� ���Ե� ���þ���� �
���丮�� �ִ��� ������ ������ �̸��� ���� ���Ͽ� ���ȴ�.
���������� �ּ����κп� �ִ� ���� ������ ���� ���, ��ҿ�
������ <code>private.html</code>�̶� �̸��� �� ������ ������
�ź��Ѵ�.</p>
<example>
&lt;Files private.html&gt;<br />
Order allow,deny<br />
Deny from all<br />
&lt;/Files&gt;
</example>
<p>���Ͻý����� Ư�� �κп� �ִ� ������ ��Ī�ϱ����� <directive
type="section" module="core">Files</directive>�� <directive
type="section" module="core">Directory</directive> ������ ����
����Ѵ�. ���� ������ ���� ���,
<code>/var/web/dir1/private.html</code>,
<code>/var/web/dir1/subdir2/private.html</code>,
<code>/var/web/dir1/subdir3/private.html</code> ����
<code>/var/web/dir1/</code> ���丮 �Ʒ��� �ִ� �̸���
<code>private.html</code>�� ������ ������ �ź��Ѵ�.</p>
<example>
&lt;Directory /var/web/dir1&gt;<br />
&lt;Files private.html&gt;<br />
Order allow,deny<br />
Deny from all<br />
&lt;/Files&gt;<br />
&lt;/Directory&gt;
</example>
</section>
<section id="webspace"><title>���� ����</title>
<p><directive type="section" module="core">Location</directive>
���þ�� �̿� �ش��ϴ� ����ǥ������ ����ϴ� ���þ�� �ݴ��
Ư�� ������ ������ �ٲ۴�. ���� ������ ���� ���, /private����
�����ϴ� URL-����� ������ �źεȴ�. ���⿡��
<code>http://yoursite.example.com/private</code>,
<code>http://yoursite.example.com/private123</code>,
<code>http://yoursite.example.com/private/dir/file.html</code>
���� <code>/private</code> ���ڿ��� �����ϴ� ��û�� �ش�ȴ�.</p>
<example>
&lt;Location /private&gt;<br />
Order Allow,Deny<br />
Deny from all<br />
&lt;/Location&gt;
</example>
<p><directive type="section" module="core">Location</directive>
���þ�� ���Ͻý��ۿ� ������ �ʿ䰡 ���. ���� ���� ��� Ư��
URL�� <module>mod_status</module>�� �����ϴ� ����ġ ���� �ڵ鷯��
������Ű������ �����ش�. ���Ͻý��ۿ� <code>server-status</code>���
������ �ʿ���.</p>
<example>
&lt;Location /server-status&gt;<br />
SetHandler server-status<br />
&lt;/Location&gt;
</example>
</section>
<section id="wildcards"><title>���ϵ�ī��� ����ǥ����</title>
<p><directive type="section" module="core">Directory</directive>,
<directive type="section" module="core">Files</directive>,
<directive type="section" module="core">Location</directive>
���þ�� C ǥ�� ���̺귯���� <code>fnmatch</code>�� ����
������ ����ϴ� ���ϵ�ī�� ���ڸ� ����� �� �ִ�.
"*" ���ڴ� � ���ڿ��̶� ��Ÿ����, "?" ���ڴ� � ���� �Ѱ���
��Ÿ����, "[<em>seq</em>]"�� <em>seq</em> �߿� �� ���ڸ� ��Ÿ����.
� ���ϵ�ī�嵵 "/" ���ڸ� ��Ÿ������ ���Ѵ�. �׷��� �� ���ڴ�
���� ����ؾ� �Ѵ�.</p>
<p>�� ������ ������ �ʿ��ϸ� perlȣȯ <a
href="glossary.html#regex">����ǥ����</a>�� ����ϴ� <directive
type="section" module="core">DirectoryMatch</directive>, <directive
type="section" module="core">FilesMatch</directive>, <directive
type="section" module="core">LocationMatch</directive>�� �����
�� �ִ�. �׷��� �Ʒ� ������ ���տ� ���� �� ����ǥ���� ������
����ϸ� ���þ ���Ǵ� ����� ��� ���ϴ��� �������.</p>
<p>��� ����� ���丮 ������ �����ϴ� ������ǥ���� ���ϵ�ī��
������ ������ ����:</p>
<example>
&lt;Directory /home/*/public_html&gt;<br />
Options Indexes<br />
&lt;/Directory&gt;
</example>
<p>����ǥ���� ������ ����Ͽ� �ѹ� ���� ������ �׸����Ͽ�
���� ������ �ź��� �� �ִ�:</p>
<example>
&lt;FilesMatch \.(?i:gif|jpe?g|png)$&gt;<br />
Order allow,deny<br />
Deny from all<br />
&lt;/FilesMatch&gt;
</example>
</section>
<section id="whichwhen"><title>������ ����ϳ�</title>
<p>���Ͻý��� ���ǰ� ���� ���� �� �ϳ��� �����ϴ� ���� ������
�ſ� ����. ���Ͻý��ۿ� �ִ� ��ü�� ���þ ����Ҷ��� �׻�
<directive type="section" module="core">Directory</directive>��
<directive type="section" module="core">Files</directive>��
����Ѵ�. (����Ÿ���̽����� ���� ���������� ����) ���Ͻý��ۿ�
���� �ʴ� ��ü�� ���þ ����Ҷ��� <directive type="section"
module="core">Location</directive>�� ����Ѵ�.</p>
<p>���Ͻý��ۿ� �ִ� ��ü�� ������ �����ϱ����� <directive
type="section" module="core">Location</directive>�� ����ϸ�
��� �ȵȴ�. ���� �ٸ� ���� ���(URL)�� ���� ���Ͻý��� ��ҿ�
������ �� �����Ƿ�, �ɾ�� ������ ��ȸ�� �� �ֱ� �����̴�. ����
������ ���� ���캸��:</p>
<example>
&lt;Location /dir/&gt;<br />
Order allow,deny<br />
Deny from all<br />
&lt;/Location&gt;
</example>
<p>�� ������ <code>http://yoursite.example.com/dir/</code>��
��û�Ѵٸ� �� �۵��Ѵ�. �׷��� ��ҹ��ڸ� ���������ʴ� ���Ͻý�����
����Ѵٸ� ��Եdz�?
<code>http://yoursite.example.com/DIR/</code>�� ��û�Ͽ� ����
������ ��ȸ�� �� �ִ�. �ݴ�� <directive type="section"
module="core">Directory</directive> ���þ�� ��� ��û�Ͽ�����
������ �� ��ҿ��� ���񽺵Ǵ� ���뿡 ���ȴ�. (���ܴ� ���Ͻý���
��ũ�� ����ϴ� ����. �ɺ���ũ�� ����Ͽ� �� ���丮��
���Ͻý����� ���� ��ҿ� �� �� �ִ�. <directive type="section"
module="core">Directory</directive> ���þ�� �ɺ���ũ�� ��󰣴�.
�׷��Ƿ� ���� ������ ������ ���ؼ��� ������ <directive
module="core">Options</directive> ���þ ����Ͽ� �ɺ���ũ��
�����ؾ� �Ѵ�.)</p>
<p>�Ƹ��� ����� ��ҹ��ڸ� �����ϴ� ���Ͻý����� ����ϹǷ�
�̷� ���� �Ͼ�� �ʴ´ٰ� �������� �𸥴�. �׷��� �ٸ�
������ε� ���� ���� ��ġ�� �� ���Ͻý��� ��ġ�� ������ ��
������ ����϶�. �׷��� �����ϸ� �׻� ���Ͻý��� ������ ����ؾ�
�Ѵ�. �׷��� �� ��Ģ�� ���ܰ� �ϳ� �ִ�. ���� ������
<code>&lt;Location /&gt;</code> ���ǿ� �θ� �� ������ Ư��
URL�� �ƴ� ��� ��û�� ���ǹǷ� �Ϻ��ϰ� �����ϴ�.</p>
</section>
</section>
<section id="virtualhost"><title>����ȣ��Ʈ</title>
<p><directive type="section" module="core">VirtualHost</directive>
������ Ư�� ȣ��Ʈ�� ���Ǵ� ���þ���� �����Ѵ�. �̴� ��
��ǻ�Ϳ��� ���� �ٸ� ������ ����� ���� ȣ��Ʈ�� �����Ҷ�
�����ϴ�. �� �ڼ��� ������ <a href="vhosts/">����ȣ��Ʈ ����</a>��
����϶�.</p>
</section>
<section id="proxy"><title>���Ͻ�</title>
<p><directive type="section" module="mod_proxy">Proxy</directive>��
<directive type="section" module="mod_proxy">ProxyMatch</directive>
������ ������ URL�� ���� <module>mod_proxy</module> ���Ͻ� ������
���� �����ϴ� ��쿡�� ���ȴ�. ���� ������ ���� ���, ���Ͻ�
������ ���� <code>cnn.com</code> ������Ʈ�� ������ �� ���.</p>
<example>
&lt;Proxy http://cnn.com/*&gt;<br />
Order allow,deny<br />
Deny from all<br />
&lt;/Proxy&gt;
</example>
</section>
<section id="whatwhere"><title>�ȿ� � ���þ ����� ��
�ֳ�?</title>
<p>� ���� ���Ǿȿ� ����� �� �ִ� ���þ �˷��� ���þ���
<a href="mod/directive-dict.html#Context">������</a>�� Ȯ���϶�.
<directive type="section" module="core">Directory</directive>����
��밡���� ���þ�� <directive type="section"
module="core">DirectoryMatch</directive>, <directive type="section"
module="core">Files</directive>, <directive type="section"
module="core">FilesMatch</directive>, <directive type="section"
module="core">Location</directive>, <directive type="section"
module="core">LocationMatch</directive>, <directive type="section"
module="mod_proxy">Proxy</directive>, <directive type="section"
module="mod_proxy">ProxyMatch</directive> ���ǿ����� ��밡���ϴ�.
�׷���, ���ܰ� �ִ�:</p>
<ul>
<li><directive module="core">AllowOverride</directive> ���þ��
<directive type="section" module="core">Directory</directive>
���ǿ����� ����� �� �ִ�.</li>
<li><code>FollowSymLinks</code>, <code>SymLinksIfOwnerMatch</code>,
<directive module="core">Options</directive>�� <directive
type="section" module="core">Directory</directive> �����̳�
<code>.htaccess</code> ���Ͽ����� ����� �� �ִ�.</li>
<li><directive module="core">Options</directive> ���þ��
<directive type="section" module="core">Files</directive>��
<directive type="section" module="core">FilesMatch</directive>
���ǿ��� ����� �� ���.</li>
</ul>
</section>
<section id="mergin"><title>���ǵ��� �����ϴ� ���</title>
<p>���� ������ �ſ� Ư���� ������� ���ȴ�. �� �� ����
���þ �ؼ��ϴ� ��� �߿��� ������ �ֱ⶧���� �� �����
�����ϴ� ���� �߿��ϴ�.</p>
<p>�����ϴ� ���:</p>
<ol>
<li> (����ǥ������ ��������ʴ�) <directive type="section"
module="core">Directory</directive>�� <code>.htaccess</code>��
���ÿ� �Ͼ�� (��쿡 ��� <code>.htaccess</code>��
<directive type="section" module="core">Directory</directive>��
�����ϵ��� ������ �� �ִ�)</li>
<li><directive type="section"
module="core">DirectoryMatch</directive> (�׸���
<code>&lt;Directory ~&gt;</code>)</li>
<li><directive type="section"
module="core">Files</directive>�� <directive type="section"
module="core">FilesMatch</directive>�� ���ÿ� �Ͼ��</li>
<li><directive type="section"
module="core">Location</directive>�� <directive type="section"
module="core">LocationMatch</directive>�� ���ÿ� �Ͼ��</li>
</ol>
<p><directive type="section"
module="core">Directory</directive>�� �����ϰ� �� ���ǵ���
�������Ͽ� ���� ���� ó���ȴ�. (���� �� 1) <directive
type="section" module="core">Directory</directive>�� ���丮
������ ���� ª�� �Ϳ��� �������� ó���ȴ�. �׷��� ���� ���,
<code>&lt;Directory /var/web/dir&gt;</code>��
<code>&lt;Directory /var/web/dir/subdir&gt;</code> ����
ó���Ѵ�. ���� ���丮�� ��Ī�ϴ� ���� <directive
type="section" module="core">Directory</directive> ������
�ִٸ� �̵��� �������� ���� ó���Ѵ�. <directive
module="core">Include</directive> ���þ�� ������ ������
<directive module="core">Include</directive> ���þ� ��ġ��
������ ���� ������ �ִ� ��ó�� ó���Ѵ�.</p>
<p><directive type="section"
module="core">VirtualHost</directive> ���� �ȿ� ���Ե� ������
����ȣ��Ʈ ���� �ۿ� �ִ� �ش� ���� <em>���Ŀ�</em> ���ȴ�.
�׷��� ����ȣ��Ʈ �ȿ��� �ּ����� ���������� ������ �� �ִ�.</p>
<p><module>mod_proxy</module>�� ��û �����Ҷ�, <directive
module="mod_proxy" type="section">Proxy</directive> ������
��� <directive module="core"
type="section">Directory</directive> ���ǰ� ����.</p>
<p>������ ������ ������ ���� ������ ��� �����Ѵ�.</p>
<note><title>����� ����</title>
������
<code>&lt;Location&gt;</code>/<code>&lt;LocationMatch&gt;</code>��
(<code>Aliases</code>�� <code>DocumentRoot</code>�� ����Ͽ�
URL�� ���ϸ����� ��ȯ�ϴ�) �̸��� �ܰ� ���� ó���ȴ�.
������ ���� ���Ŀ��� ������ �����Ѵ�.
</note>
<section id="merge-examples"><title>����</title>
<p>������ �����ϴ� �� �����ϴ� ����. �̵� ��� ��û��
���ȴٰ� �����ϸ� ���þ�� A &gt; B &gt; C &gt; D &gt; E
��� ó���ȴ�.</p>
<example>
&lt;Location /&gt;<br />
E<br />
&lt;/Location&gt;<br />
<br />
&lt;Files f.html&gt;<br />
D<br />
&lt;/Files&gt;<br />
<br />
&lt;VirtualHost *&gt;<br />
&lt;Directory /a/b&gt;<br />
B<br />
&lt;/Directory&gt;<br />
&lt;/VirtualHost&gt;<br />
<br />
&lt;DirectoryMatch "^.*b$"&gt;<br />
C<br />
&lt;/DirectoryMatch&gt;<br />
<br />
&lt;Directory /a/b&gt;<br />
A<br />
&lt;/Directory&gt;<br />
<br />
</example>
<p>�� �������� ���� ������ ����. <directive module="core"
type="section">Location</directive> ������ ���߿� ó���ϹǷ�
<directive module="core" type="section">Directory</directive>
���ǿ� �ִ� �������Ѱ� ������ ������ ������ ������ �����ϴ�.
��, �����ϴ� ��� �߿��ϹǷ� �����϶�!</p>
<example>
&lt;Location /&gt;<br />
Order deny,allow<br />
Allow from all<br />
&lt;/Location&gt;<br />
<br />
# ��! �� &lt;Directory&gt; ������ �ƹ��� ȿ�� ���<br />
&lt;Directory /&gt;<br />
Order allow,deny<br />
Allow from all<br />
Deny from badguy.example.com<br />
&lt;/Directory&gt;
</example>
</section>
</section>
</manualpage>