urlmapping.xml.ko revision 24cdcfa9513d95edf99a83dfa334bdec5e58b250
<?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:932378 (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="urlmapping.xml.meta">
<title>URL�� ���Ͻý��� ��ġ�� �����ϱ�</title>
<summary>
<p>�� ������ ��û�� URL�� ������ ����ġ�� ��� ������
������ ���Ͻý��ۻ� ��ġ�� ã���� �����Ѵ�.</p>
</summary>
<section id="related"><title>��õ� ���� ���þ��</title>
<related>
<modulelist>
<module>mod_alias</module>
<module>mod_proxy</module>
<module>mod_rewrite</module>
<module>mod_userdir</module>
<module>mod_speling</module>
<module>mod_vhost_alias</module>
</modulelist>
<directivelist>
<directive module="mod_alias">Alias</directive>
<directive module="mod_alias">AliasMatch</directive>
<directive module="mod_speling">CheckSpelling</directive>
<directive module="core">DocumentRoot</directive>
<directive module="core">ErrorDocument</directive>
<directive module="core">Options</directive>
<directive module="mod_proxy">ProxyPass</directive>
<directive module="mod_proxy">ProxyPassReverse</directive>
<directive module="mod_proxy">ProxyPassReverseCookieDomain</directive>
<directive module="mod_proxy">ProxyPassReverseCookiePath</directive>
<directive module="mod_alias">Redirect</directive>
<directive module="mod_alias">RedirectMatch</directive>
<directive module="mod_rewrite">RewriteCond</directive>
<directive module="mod_rewrite">RewriteMatch</directive>
<directive module="mod_alias">ScriptAlias</directive>
<directive module="mod_alias">ScriptAliasMatch</directive>
<directive module="mod_userdir">UserDir</directive>
</directivelist>
</related>
</section>
<section id="documentroot"><title>DocumentRoot</title>
<p>��û�� ���� ����ġ�� � ������ �������� �����ϱ�����
�⺻������ ��û�� URL-���(URL���� ȣ��Ʈ��� ��Ʈ �ڿ�
������ �κ�)�� �������Ͽ��� ������ <directive
module="core">DocumentRoot</directive> �ڿ� ���δ�. �׷���
<directive module="core">DocumentRoot</directive> �Ʒ��ִ�
���ϰ� ���丮���� ������ ���Ե� �⺻���� �����̴�.</p>
</section>
<section id="outside"><title>DocumentRoot �ۿ� �ִ� ���ϵ�</title>
<p>���� ���Ͻý��ۿ��� <directive
module="core">DocumentRoot</directive> �Ʒ� �������� �κ���
������ ������ �ʿ䰡 �ִ�. ����ġ�� �� ��� �������� �����
����� �� �ִ�. ���н� �ý��ۿ��� �ɺ���ũ�� ����Ͽ�
���Ͻý����� �ٸ� �κ��� <directive
module="core">DocumentRoot</directive> �Ʒ��� �� �� �ִ�.
������ ���� ����ġ�� �ش� ���丮�� <directive
module="core">Options</directive> ������
<code>FollowSymLinks</code>��
<code>SymLinksIfOwnerMatch</code>�� �ִ� ��쿡�� �ɺ���ũ��
��󰣴�.</p>
<p>��, <directive module="mod_alias">Alias</directive>
���þ�� ���Ͻý����� Ư�� �κ��� ���� �����Ѵ�. ����
��� ������ ���ٸ�</p>
<example>Alias /docs /var/web</example>
<p>URL <code>http://www.example.com/docs/dir/file.html</code>��
<code>/var/web/dir/file.html</code>�� ������ �����Ѵ�.
������ ��ο� �ִ� ��� ������ CGI ��ũ��Ʈ�� ����ϴ� ����
�����ϰ�� <directive module="mod_alias">ScriptAlias</directive>
���þ ���� ���� �Ѵ�.</p>
<p><directive module="mod_alias">AliasMatch</directive>��
<directive module="mod_alias">ScriptAliasMatch</directive>
���þ��� ������ ����ǥ���ı�� ������ ��ġ�� ����Ͽ� ��
������ ������ �����ϴ�. ���� ���,</p>
<example>ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
/home/$1/cgi-bin/$2</example>
<p>�� <code>http://example.com/~user/cgi-bin/script.cgi</code>����
��û�� ��� <code>/home/user/cgi-bin/script.cgi</code>��
�����ϰ�, �ش� ������ CGI ��ũ��Ʈ�� ����Ѵ�.</p>
</section>
<section id="user"><title>����� ���丮</title>
<p>���н� �ý����� ���������� Ư�� ����� <em>user</em>��
Ȩ���丮�� <code>~user/</code>�� ��Ī�Ѵ�.
<module>mod_userdir</module> ����� �� ������ ��������
Ȯ���Ͽ�, ������ ���� URL�� ������ �� ����� Ȩ���丮
�ȿ� �ִ� ������ �����Ѵ�.</p>
<example>http://www.example.com/~user/file.html</example>
<p>���Ȼ� ������ ����� Ȩ���丮�� ���� ������ �� ������
�ȵȴ�. �׷��� <directive module="mod_userdir">UserDir</directive>
���þ�� ����� Ȩ���丮���� ���� ���ϵ��� ���� ���丮��
�����Ѵ�. �⺻ ���� <code>Userdir public_html</code>�� ����ϰ�
<code>/home/user/</code>�� <code>/etc/passwd</code>�� ������
����� Ȩ���丮���, ���� URL�� ����
<code>/home/user/public_html/file.html</code>�� �����Ѵ�.</p>
<p>��, <code>Userdir</code> ���þ�� <code>/etc/passwd</code>��
Ȩ���丮�� ��ġ�� ��������ʴ� �ý����� ���� ���� �ٸ�
���¸� ����� �� �ִ�.</p>
<p>� ����� (���� ������ <code>%7e</code>�� ���ڵ�Ǵ�)
"~" ��ȣ�� �̻��Ͽ� �ٸ� ������� ����� ���丮�� ��Ÿ����
�;��Ѵ�. �� ����� mod_userdir�� ���������ʴ´�. �׷���
����� Ȩ���丮�� ��Ģ���� ������� �������ִٸ�, <directive
module="mod_alias">AliasMatch</directive> ���þ ����Ͽ�
���ϴ� ȿ�� ���� �� �ִ�. ���� ���, ������
<code>AliasMatch</code> ���þ ����ϸ�
<code>http://www.example.com/upages/user/file.html</code>��
<code>/home/user/public_html/file.html</code>�� �����Ѵ�:</p>
<example>AliasMatch ^/upages/([a-zA-Z0-9]+)/?(.*)
/home/$1/public_html/$2</example>
</section>
<section id="redirect"><title>URL �����̷���(Redirection)</title>
<p>�տ��� ������ ���� ���þ���� ����ġ�� ���Ͻý����� Ư��
��ҿ� �ִ� ������ Ŭ���̾�Ʈ���� ������ �����. �׷���
������ ��û�� ������ �ٸ� URL�� �ִٰ� Ŭ���̾�Ʈ���� �˷��־�,
Ŭ���̾�Ʈ�� ���� �� URL�� ��û�ϵ��� ����� ���� ���� ����
�ִ�. �̸� <em>�����̷���(redirection)</em>�̶�� �ϸ�,
<directive module="mod_alias">Redirect</directive> ���þ
����Ѵ�. ���� ���, <directive
module="core">DocumentRoot</directive> �Ʒ� <code>/foo/</code>
���丮�� ������ ���� <code>/bar/</code> ���丮�� �Ű�ٸ�
������ ���� Ŭ���̾�Ʈ�� ���ο� ��ġ�� ��û�ϵ��� �Ѵ�:</p>
<example>Redirect permanent /foo/
http://www.example.com/bar/</example>
<p>�׷��� <code>www.example.com</code> ������ <code>/foo/</code>��
�����ϴ� URL-��δ� <code>/foo/</code>�� <code>/bar/</code>��
�ٲ� URL�� �����̷��ǵȴ�. Ŭ���̾�Ʈ�� �� �����ܿ� �
�ٸ� �����ε� �����̷����� �� �ִ�.</p>
<p>��, ����ġ�� �� ������ ���ۼ� ������ ����
<directive module="mod_alias">RedirectMatch</directive>
���þ �����Ѵ�. ���� ���, �ٸ� ��û�� �״�� �ΰ� ����Ʈ
Ȩ�������� ���� ��û���� �ٸ� ����Ʈ�� �����̷����Ϸ���:</p>
<example>RedirectMatch permanent ^/$
http://www.example.com/startpage.html</example>
<p>�ӽ÷� ����Ʈ�� ��� �������� �ٸ� ����Ʈ�� Ư�� ��������
�����̷����Ϸ���:</p>
<example>RedirectMatch temp .*
http://othersite.example.com/startpage.html</example>
</section>
<section id="proxy"><title>�����Ͻ�(Reverse Proxy)</title>
<p>����ġ�� �ٸ� ������ �ִ� ������ ������ URL ������ ������
�� �ִ�. �� ��� �������� ��� �������� ������ �����ͼ�
Ŭ���̾�Ʈ���� ����ϴ� ���Ͻ� ������ ���� �����ϱ⶧���� �̷�
����� <em>�����Ͻ�(reverse proxying)</em>��� �Ѵ�. Ŭ���̾�Ʈ��
���忡�� �����Ͻ� ������ ������ �����ִ� ��ó�� ���̹Ƿ� �Ϲ�
���Ͻÿʹ� �ٸ���.</p>
<p>�Ʒ� �������� Ŭ���̾�Ʈ�� <code>/foo/</code>�� �ִ� ������
��û�ϸ�, ������ <code>internal.example.com</code>��
<code>/bar/</code> ���丮���� ������ �����ͼ� ������ ��ġ
������ �־�� ��ó�� Ŭ���̾�Ʈ���� ������.</p>
<example>
ProxyPass /foo/ http://internal.example.com/bar/<br />
ProxyPassReverse /foo/ http://internal.example.com/bar/
</example>
<p><directive module="mod_proxy">ProxyPass</directive>�� ������
������ ������ ���������� �����ϸ�, <directive
module="mod_proxy">ProxyPassReverse</directive> ���þ��
<code>internal.example.com</code>�� ������ �����̷����� ���ۼ��Ͽ�
�����̷����� ���� ������ ������ ���丮�� ����Ű���� �Ѵ�.
��, <directive
module="mod_proxy">ProxyPassReverseCookieDomain</directive>��
<directive module="mod_proxy">ProxyPassReverseCookieDomain</directive>��
���� ������� �� ������ ���� ��Ű�� ���ۼ��Ѵ�.</p>
<p>�׷��� ���� �ȿ� �ִ� ��ũ�� ���ۼ����� ������ �����϶�.
<code>internal.example.com</code>�� ���� ��븵ũ�� Ŭ���̾�Ʈ��
���Ͻü����� �ƴ϶� <code>internal.example.com</code>���� ����
��û�ϰ� �Ѵ�. �����ڰ� ���� <a
href="http://apache.webthing.com/mod_proxy_html/">mod_proxy_html</a>
����� ����Ͽ� HTML�� XHTML�� �ִ� ��ũ�� ���ۼ��� �� �ִ�.</p>
</section>
<section id="rewrite"><title>���ۼ� ���� (Rewriting Engine)</title>
<p>�� ������ ġȯ�� �ʿ��Ҷ� <module>mod_rewrite</module>��
���ۼ� ������ ������ �ȴ�. �� ����� ���þ�� ������ ����
Ŭ���̾�Ʈ�� IP �ּ� �� ��û�� Ư¡�� ������ ��� �ִ�
������ �������� ������ �� �ִ�. ��, mod_rewrite�� ��û��
��� ó������ �����ϱ����� �ܺ� �����ͺ��̽� �����̳�
���α׷��� ����� �� �ִ�. ���ۼ� ������ ������ �ٷ� ��
���� ����, ��, ���� �����̷��� (alias), �ܺ� �����̷���,
���Ͻ�, ��θ� �����Ѵ�. mod_rewrite�� ����ϴ� ���� ����
<a href="misc/rewriteguide.html">URL ���ۼ� ��ħ��</a>����
�����Ѵ�.</p>
</section>
<section id="notfound"><title>File Not Found</title>
<p>�ᱹ ��û�� URL�� �����ϴ� ������ ���Ͻý��ۿ��� ã��
���� ����̴�. ���� ���� ������ �ִ�. � ��� ������
�ٸ� ������ �Ű�� ������ �� �ִ�. �� ��� Ŭ���̾�Ʈ����
<a href="#redirect">URL �����̷���</a>���� �ڿ��� ���ο�
��ġ�� �˷��ִ� ����� ���� ����. �׷��� �ڿ��� �Űܵ�
������ �ϸ�ũ�� ��ũ�� ��� ��ȿ�ϴ�.</p>
<p>"File Not Found" ������ �ٸ� �Ϲ����� ������ ������
���� Ȥ�� HTML ��ũ�� URL�� �߸� �Էµ� ����̴�. ����ġ��
<module>mod_speling</module> (������� Ʋ���� �ʾ���) ����
�̿� ���� ������ ���´�. �� ����� ����ϸ� "File Not Found"
���� �߻��ϴ� ��� ����� ���ϸ��� ���� �ڿ��� ã�´�.
���� �߰��ϸ� mod_speling�� Ŭ���̾�Ʈ�� �ùٸ� ��ġ��
HTTP �����̷����Ѵ�. "�����" ������ ������ �ִٸ�
Ŭ���̾�Ʈ���� ����� ������.</p>
<p>mod_speling�� Ư�� ������ ������ ��ҹ��ڸ� ���������ʰ�
���ϸ��� ���ϴ� ����̴�. �׷��� ���н� ���Ͻý��۰� URL��
��ҹ��� ������ �������ϴ� ����ڰ� �ִ� �ý��ۿ� ������
�ȴ�. �׷��� mod_speling�� ���� URL�� ���ľ��Ѵٸ�, "�߸��"
��û������ URL �����̷��ǰ� Ŭ���̾�Ʈ�� ���ο� ��û��
�Ͼ�Ƿ� ������ �δ��� �ȴ�.</p>
<p>ã�� �õ��� ��� �����ϸ� ����ġ�� HTTP status code 404
(file not found) ������������ ������. �� �������� ������
<directive module="core">ErrorDocument</directive> ���þ��
�����ϸ�, <a href="custom-error.html">��������� ���� ����</a>
������ ����Ͽ� ����������� �� �ִ�.</p>
</section>
</manualpage>