htaccess.xml.ko revision b244bbf442a0aea3dc397b4d0d751f4716c5891d
<?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: 151408:1561569 (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="htaccess.xml.meta">
<parentdocument href="./">How-To / Tutorials</parentdocument>
<title>����ġ ���丮��: .htaccess ����</title>
<summary>
<p><code>.htaccess</code> ������ ����Ͽ� ���丮���� ������
������ �� �ִ�.</p>
</summary>
<section id="related"><title>.htaccess ����</title>
<related>
<modulelist>
<module>core</module>
<module>mod_authn_file</module>
<module>mod_authz_groupfile</module>
<module>mod_cgi</module>
<module>mod_include</module>
<module>mod_mime</module>
</modulelist>
<directivelist>
<directive module="core">AccessFileName</directive>
<directive module="core">AllowOverride</directive>
<directive module="core">Options</directive>
<directive module="mod_mime">AddHandler</directive>
<directive module="core">SetHandler</directive>
<directive module="core">AuthType</directive>
<directive module="core">AuthName</directive>
<directive module="mod_authn_file">AuthUserFile</directive>
<directive module="mod_authz_groupfile">AuthGroupFile</directive>
<directive module="core">Require</directive>
</directivelist>
</related>
</section>
<section id="what">
<title>�����̸�/��� ����ϴ°�</title>
<p><code>.htaccess</code> ����(Ȥ�� "�л� ��������")��
����ϸ� ���丮���� ������ ������ �� �ִ�. ���� ���� ���þ
�ִ� ������ Ư�� ���� ���丮�� �θ�, �� ���丮�� ���
�������丮�� ���þ ����Ѵ�.</p>
<note><title>����:</title>
<p><code>.htaccess</code> ���ϸ��� �ٸ��� ����ϰ� �ʹٸ�,
<directive module="core">AccessFileName</directive> ���þ
����Ͽ� ������ �� �ִ�. ���� ���, <code>.config</code>
���ϸ��� ����Ϸ��� ���� �������Ͽ� ������ ���� �߰��Ѵ�.</p>
<example>
AccessFileName .config
</example>
</note>
<p>�Ϲ������� <code>.htaccess</code> ������ <a
href="/configuring.html#syntax">�ּ�������</a>�� ������
����. <directive module="core">AllowOverride</directive>
���þ �� ���Ͽ� ���� �� �ִ� ������ �����Ѵ�. �� ���þ��
<code>.htaccess</code> ���Ͽ��� ����ϴ� ���þ� �з� �����Ѵ�.
���þ <code>.htaccess</code> ���Ͽ��� ����� �� �ִٸ�,
�ش� ���þ� ������ Override �׸��� ���þ ����ϱ�����
<directive module="core">AllowOverride</directive>�� �����
���� �˷��ش�.</p>
<p>���� ���, <directive module="core">AddDefaultCharset</directive>
���þ� ������ ���� �� ���þ <code>.htaccess</code> ���Ͽ���
����� �� �ִ�. (���þ� ��࿡�� ������ �׸��� ����.)
<a href="/mod/directive-dict.html#Context">Override</a>
�ٿ� <code>FileInfo</code>�� �ִ�. �׷��� �� ���þ
<code>.htaccess</code> ���Ͽ��� ����ϱ����ؼ��� �ּ���
<code>AllowOverride FileInfo</code>�� �ʿ��ϴ�.</p>
<example><title>����:</title>
<table>
<tr>
<td><a
href="/mod/directive-dict.html#Context">������:</a></td>
<td>�ּ�������, ����ȣ��Ʈ, directory, .htaccess</td>
</tr>
<tr>
<td><a
href="/mod/directive-dict.html#Override">Override:</a></td>
<td>FileInfo</td>
</tr>
</table>
</example>
<p>Ư�� ���þ <code>.htaccess</code> ���Ͽ��� �����
�� �ִ��� �ñ��ϸ� ���þ� ������ ������ �׸� ".htaccess"��
�ִ��� Ȯ���Ѵ�.</p>
</section>
<section id="when"><title>���� .htaccess ������ ����ϳ�
(Ȥ�� ������� �ʳ�)</title>
<p>�Ϲ������� �ּ������Ͽ� ������ �� ��� ��찡 �ƴ϶��
<code>.htaccess</code> ������ ����ϸ� �ȵȴ�. ���� ���,
����� ������ �׻� <code>.htaccess</code> ���Ͽ� �־��
�Ѵٴ� ���� �߸� �˷��� ���ش�. �̴� ����� �ƴϴ�. �ּ���������
����� ���� ������ ���� �� �ְ�, ��� �̷��� ���Ѵ�.</p>
<p><code>.htaccess</code> ������ ������ �����ڰ� ���丮����
���� ������ �ٸ����ϰ� ������ ���� �ý��ۿ� root ������
��� ��쿡 ����Ѵ�. ���� ���ڰ� ������ ���� �����ϰ�
���� ���� ��� �Ϲ� ����ڰ� ���� <code>.htaccess</code>
������ �����ϵ��� ����ϴ� ���� �ٶ����ϴ�. ���� ���, ��
��ǻ�Ϳ� ���� ����� ����Ʈ�� �����ϴ� ISP���� ����ڰ�
�ڽ��� ������ �����ϰ� ���� ��찡 �׷��ϴ�.</p>
<p>�׷��� �Ϲ������� <code>.htaccess</code> ������ ������
���ؾ� �Ѵ�. <code>.htaccess</code> ���Ͽ��� ����ϴ� ���þ��
�ּ��������� <directive module="core"
type="section">Directory</directive> ���ǰ� ���� ȿ��
�ִ�.</p>
<p>���� �ΰ��� ū ���������� <code>.htaccess</code> ����
����� ���ؾ� �Ѵ�.</p>
<p>ù��°�� �����̴�. <directive
module="core">AllowOverride</directive>�� <code>.htaccess</code>
������ ����ϵ��� ����ϸ�, ����ġ�� ���丮����
<code>.htaccess</code> ������ ã�´�. �׷���
<code>.htaccess</code> ������ ����ϸ� ������ ������ �������
�ʴ� ��쿡�� ������ �������! ��, <code>.htaccess</code>
������ ������ ��û�Ҷ����� �о���δ�.</p>
<p>�Դٰ� ����ؾ� �ϴ� ��ü ���þ ���������� ����ġ��
��� ���� ���丮���� <code>.htaccess</code> ������ ã�´�.
(<a href="#how">��� ���þ ����ϳ�</a> ���� ���.)
�׷��� <code>/www/htdocs/example</code> ���丮�� �ִ�
������ ��û�ϸ�, ����ġ�� ���� ���ϵ��� ã�ƾ� �Ѵ�.</p>
<example>
/.htaccess<br />
/www/.htaccess<br />
/www/htdocs/.htaccess<br />
/www/htdocs/example/.htaccess
</example>
<p>�׷��� �� ���丮�� �ִ� ������ ������ ������ ����������
���� �� ���Ͻý����� 4�� �� �����ؾ� �Ѵ�.
(<code>/</code>������ <code>.htaccess</code> ������ �����
��츦 ���Ѵ�. ������ ������� �ʴ´�.)</p>
<p>�ι�° ������ �����̴�. ����ڿ��� �������� ���� ������
�ָ� ����� ������ �� ��� ��ȭ�� �Ͼ �� �ִ�. ����ڿ���
�̷� ������ ���� ������ ���϶�. ��, ����ڰ� ���ϴ� �ͺ���
���� ������ �ָ� ��������û�� ���´�. ����ڿ��� ������
���� ������ ��Ȯ�� �˷���. ����ڿ��� <directive
module="core">AllowOverride</directive>�� ��� �����Ͽ�����
��Ȯ�� �˸��� ��� ������ �����ϸ� ������ ȥ���� ���� ��
�ִ�.</p>
<p>���þ <code>/www/htdocs/example</code> ���丮��
<code>.htaccess</code> ������ �δ� �Ͱ� �ּ���������
<code>&lt;Directory /www/htdocs/example&gt;</code> Directory
������ �δ� ���� ������ ����.</p>
<p><code>/www/htdocs/example</code>�� �ִ�
<code>.htaccess</code> ����:</p>
<example><title><code>/www/htdocs/example</code>�� �ִ�
.htaccess ���� ����</title>
AddType text/example .exm
</example>
<example><title><code>httpd.conf</code> ���Ͽ� �ִ� ����</title>
&lt;Directory /www/htdocs/example&gt;<br />
<indent>
AddType text/example .exm<br />
</indent>
&lt;/Directory&gt;
</example>
<p>�׷��� ������ ��û�� ������ ������ �����ʰ� ����ġ��
�����Ҷ� �ѹ� ������ �б⶧���� ���� ������ �����������Ͽ�
����ϸ� ������ �� ���.</p>
<p><directive module="core">AllowOverride</directive> ���þ
<code>none</code>���� �����ϸ� <code>.htaccess</code> ������
������ ����� �� ���.</p>
<example>
AllowOverride None
</example>
</section>
<section id="how"><title>��� ���þ ����ϳ�</title>
<p><code>.htaccess</code> ������ �߰��� ���丮�� �� ���丮��
��� �������丮�� <code>.htaccess</code> ���Ͽ� �ִ� ����
���þ ����Ѵ�. �׷��� �������丮�� <code>.htaccess</code>
������ �����ؾ� �Ѵ�. �߰��� ��� ���þ ����Ѵ�. Ư��
���丮�� �ִ� <code>.htaccess</code> ������ �������丮��
�ִ� <code>.htaccess</code> ������ ���þ ��ȿ�� ����
�� �ְ�, �������丮�� �ִ� ���þ�� �� �������丮 Ȥ��
�ּ������Ͽ� �ִ� ���þ ��ȿ�� ���� �� �ִ�.</p>
<p>����:</p>
<p><code>/www/htdocs/example1</code> ���丮�� ������ ����
<code>.htaccess</code> ������ �ִ�.</p>
<example>
Options +ExecCGI
</example>
<p>(����: <code>.htaccess</code> ���Ͽ� "<directive
module="core">Options</directive>" ���þ ����Ϸ���
"<code>AllowOverride Options</code>"�� �ʿ��ϴ�.)</p>
<p><code>/www/htdocs/example1/example2</code> ���丮����
������ ���� <code>.htaccess</code> ������ �ִ�.</p>
<example>
Options Includes
</example>
<p>�� �� <code>.htaccess</code> ������
<code>Options Includes</code>�� ���� ������ ������ ��ȿ��
����⶧���� <code>/www/htdocs/example1/example2</code>
���丮�� CGI ������ ������� �ʴ´�.</p>
</section>
<section id="auth"><title>���� ����</title>
<p>���� ����� �˱����� �ٷ� �̰����� �д´ٸ� ������ ����
�ִ�. ��ȣ ������ �Ϸ��� <code>.htaccess</code> ������
�ʿ��ϴٴ� ���ذ� �θ� �����ִ�. �̴� ����� �ƴϴ�.
�ּ��������� <directive module="core"
type="section">Directory</directive> ���ǿ� ���� ���þ
�δ� ���� �� �����ϴ� ����̰�, ������ �ּ��������� ������
�� ��� ��쿡�� <code>.htaccess</code> ������ ����ؾ�
�Ѵ�. ���� <code>.htaccess</code> ������ ����ؾ� �ϴ�����
������� ���ƾ� �ϴ����� <a href="#when">������</a>
�����Ͽ���.</p>
<p>�տ��� �������� ������ <code>.htaccess</code> ������
�ʿ��ϴٰ� ��Ǹ� �Ʒ� ������ ������ �� ���̴�.</p>
<p><code>.htaccess</code> ���� ����.</p>
<example>
AuthType Basic<br />
AuthName "Password Required"<br />
AuthUserFile /www/passwords/password.file<br />
AuthGroupFile /www/passwords/group.file<br />
Require Group admins
</example>
<p>�� ���þ �����ϱ����ؼ���
<code>AllowOverride AuthConfig</code> ���þ �ʿ�����
����϶�.</p>
<p>������ ���Ѻο��� ���� �ڼ��� ������ <a href="auth.html">����
���丮��</a>�� ���� �ٶ���.</p>
</section>
<section id="ssi"><title>Server Side Includes ����</title>
<p>�Ǵٸ� �Ϲ����� <code>.htaccess</code> ������ �뵵��
Ư�� ���丮���� Server Side Includes�� �����ϰ� �����
���̴�. ���ϴ� ���丮�� <code>.htaccess</code> ���Ͽ�
������ ���� ���� ���þ ����ϸ� �ȴ�.</p>
<example>
Options +Includes<br />
AddType text/html shtml<br />
AddHandler server-parsed shtml
</example>
<p>�� ���þ �����Ϸ��� <code>AllowOverride Options</code>��
<code>AllowOverride FileInfo</code>�� ��� �ʿ����� ����϶�.</p>
<p>server-side includes�� ���� �ڼ��� ������ <a
href="ssi.html">SSI ���丮��</a>�� ���� �ٶ���.</p>
</section>
<section id="cgi"><title>CGI ����</title>
<p>���������� <code>.htaccess</code> ������ ����Ͽ� Ư��
���丮���� CGI ���α׷� ������ ����ϰ� �ʹٸ�, ������
���� ������ ����Ѵ�.</p>
<example>
Options +ExecCGI<br />
AddHandler cgi-script cgi pl
</example>
<p>Ȥ�� �� ���丮�� �ִ� ��� ������ CGI ���α׷�����
ó���ϰ� �ʹٸ� ������ ���� ������ �����ϴ�.</p>
<example>
Options +ExecCGI<br />
SetHandler cgi-script
</example>
<p>�� ���þ �����Ϸ��� <code>AllowOverride Options</code>��
<code>AllowOverride FileInfo</code>�� ��� �ʿ����� ����϶�.</p>
<p>CGI ���α׷��ְ� ������ ���� �ڼ��� ������ <a
href="cgi.html">CGI ���丮��</a>�� ���� �ٶ���.</p>
</section>
<section id="troubleshoot"><title>�����ذ�</title>
<p><code>.htaccess</code> ���Ͽ� �� ���� ���þ ���ϴ�
����� ���� �ʴ� ��� �������� ������ ���� �� �ִ�.</p>
<p>���� �Ϲ����� ������ ���� ���þ �����ϰ� ����� <directive
module="core">AllowOverride</directive>�� �������� ����
����. ������ �Ǵ� ���� ������ <code>AllowOverride None</code>��
����� Ȯ���Ѵ�. <code>.htaccess</code> ������ �ƹ����Գ�
���� ���� �������� �ٽ� �����Ͽ� ���� �˻��غ� �� �ִ�.
���� ���� ������ ������ ���� Ȯ����
<code>AllowOverride None</code>�� ����� ����.</p>
<p>�ݴ�� ������ �����Ҷ� ���� ���� �߻��ϸ� ����ġ ����α׸�
�������. �Ƹ��� <code>.htaccess</code> ���Ͽ� �ִ� ���þ
������� �ʴ´ٰ� �� ���̴�. �ƴϰ� ���� ���� �ִٸ� ����
��ģ��.</p>
</section>
</manualpage>