<-
Apache > HTTP Server > Documentation > Version 2.4 > ����ȣ��Ʈ

�̸���� ����ȣ��Ʈ ����

������ ���:  de  |  en  |  fr  |  ja  |  ko  |  tr 

�� ������ �ֽ��� ������ �ƴմϴ�. �ֱٿ� ����� ������ ���� ������ �����ϼ���.

�� ������ �̸���� ����ȣ��Ʈ�� ����ϴ� ���� ����� �����Ѵ�.

Support Apache!

����

top

�̸���� �� IP��� ����ȣ��Ʈ

IP��� ����ȣ��Ʈ�� ������ IP �ּҸ� ������ ������ ����ȣ��Ʈ�� �����Ѵ�. �׷��� �� ȣ��Ʈ�� ���� �ٸ� IP �ּҸ� ������ �Ѵ�. �̸���� ����ȣ��Ʈ�� ��� ������ Ŭ���̾�Ʈ�� HTTP ����� ȣ��Ʈ���� �˷��ֱ� �ٶ���. �̷� ������� �� IP �ּҷ� ���� �ٸ� ȣ��Ʈ�� ������ �� �ִ�.

�̸���� ����ȣ��Ʈ�� DNS ������ �� ȣ��Ʈ���� �ùٸ� IP �ּҷ� �����ϵ��� ����ȣ��Ʈ�� �����ϰ�, �ٸ� ȣ��Ʈ���� ������ �� �ֵ��� ����ġ �������� �����ϱ⸸ �ϸ�ǹǷ� �� �����ϴ�. �̸���� ����ȣ��Ʈ�� �� ���� IP �ּҰ� �ʿ����. �׷��Ƿ� Ư���� IP��� ����ȣ��Ʈ�� ������ ������ ���ٸ� �̸���� ����ȣ��Ʈ�� ����ؾ� �Ѵ�. IP��� ����ȣ��Ʈ�� ����ؾ��� �����δ�:

top

�̸���� ����ȣ��Ʈ ����ϱ�

�̸���� ����ȣ��Ʈ�� ����Ϸ��� ������ ������ ���� IP �ּҸ� (�Ƹ� ��Ʈ��) ���ؾ� �Ѵ�. �̴� NameVirtualHost ���þ�� �����ϴ�. �Ϲ������� ������ ��� IP �ּҸ� ����Ѵٸ� NameVirtualHost�� �ƱԸ�Ʈ�� *�� ����Ѵ�. ���� ��Ʈ�� ����� (���� ���, SSL�� �����) ��ȹ�̶�� *:80�� ���� �ƱԸ�Ʈ�� ��Ʈ�� �߰��ؾ� �Ѵ�. NameVirtualHost ���þ IP �ּҸ� �����־��ٰ� ������ �ڵ����� �� IP �ּҸ� ��ٸ��� ������ �����϶�. �ڼ��� ������ ����ġ�� ����� �ּҿ� ��Ʈ �����ϱ��� �����϶�. ��, ���⼭ ������ IP �ּҴ� ������ ��Ʈ�� �������̽��̾�� �Ѵ�.

���� �ܰ�� �����Ϸ��� ȣ��Ʈ���� <VirtualHost> ������ ����� ���̴�. <VirtualHost>> ���þ��� �ƱԸ�Ʈ�� NameVirtualHost ���þ��� �ƱԸ�Ʈ(���� ���, IP �ּҳ� ��� �ּҸ� ���ϴ� *)�� ���ƾ� �Ѵ�. <VirtualHost>> ���� �ȿ��� �ּ��� ������ ȣ��Ʈ�� �����ϴ� ServerName ���þ�� ȣ��Ʈ�� ������ ���Ͻý��� ��� �ִ����� �����ϴ� DocumentRoot ���þ �ʿ��ϴ�.

�� ȣ��Ʈ�� ��������

������ ����ϴ� �������� ����ȣ��Ʈ�� �߰��Ѵٸ� ������ ����ϴ� ȣ��Ʈ�� ���� <VirtualHost> ���ϵ� �߰��ؾ� �Ѵ�. �� ���Ͽ� �����ϴ� ServerName�� DocumentRoot�� ��ü ServerName�� DocumentRoot�� ���ƾ� �Ѵ�. �������Ͽ��� �� ����ȣ��Ʈ�� ���� ���� ������ �⺻ ȣ��Ʈ�� �ȴ�.

���� ��� www.domain.tld �������� �����ϰ� �־��µ� ���� IP �ּҿ� www.otherdomain.tld�� ����ȣ��Ʈ�� �߰��ϰ� �ʹٰ� ��������. apache2.conf�� ������ ���� �߰��ϸ� �ȴ�:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.domain.tld
ServerAlias domain.tld *.domain.tld
DocumentRoot /www/domain
</VirtualHost>

<VirtualHost *:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain
</VirtualHost>

NameVirtualHost�� <VirtualHost> ���þ� �� ��� * ��� ���� IP �ּҸ� ������ ���� �ִ�. ���� ���, �̷������� �� IP �ּҿ� ���� �̸���� ����ȣ��Ʈ���� ������, �ٸ� �ּҿ� IP��� Ȥ�� �̸���� ����ȣ��Ʈ���� ���� �� �ִ�.

� ������ ���� �̸����� ������ �� �ֱ� �ٶ���. �̴� <VirtualHost> ���� �ȿ� ServerAlias ���þ ����Ͽ� �����ϴ�. ���� ��� ���� ù��° <VirtualHost> ���Ͽ��� ServerAlias ���þ ����ϸ� ������ �̸����� ���� ������Ʈ�� �� �� �ִ�:

ServerAlias domain.tld *.domain.tld

domain.tld �����ο� �ִ� ��� ȣ��Ʈ�� ���� ��û�� www.domain.tld ����ȣ��Ʈ�� �����Ѵ�. �̸��� �ٶ� ���ϵ�ī�� ���� *�� ?�� ����� �� �ִ�. ���� ServerName�̳� ServerAlias�� �̸��� �����־��ٰ� ���� �ƴϴ�. ���� �� �̸����� ������ IP �ּҷ� �����ϵ��� DNS ������ �˸°� �����ؾ� �Ѵ�.

���������� <<VirtualHost>> �ȿ� �ٸ� ���þ���� ����Ͽ� ����ȣ��Ʈ�� �ڼ��� ������ �� �ִ�. ��κ��� ���þ ����� �� ������, ���õ� ����ȣ��Ʈ�� �������� �����Ѵ�. � ���þ ��밡������ �˷��� ���þ��� �������� Ȯ���϶�. (<<VirtualHost>> ���� �ƴ�) �ּ����������� ������ ���� ���þ�� ����ȣ��Ʈ�� ���� ���� ���þ ���� ��쿡�� ���ȴ�.

��û�� ������ ������ ���� NameVirtualHost���� ������ IP �ּ����� �˻��Ѵ�. �׷��ٸ� �� IP �ּҸ� ���� <VirtualHost> ���ǵ鿡�� ��û�� ȣ��Ʈ���� ��ġ�ϴ� ServerName�̳� ServerAlias�� ã�´�. ã���� �� ������ ����Ѵ�. ������ ����ȣ��Ʈ�� ã�����ϸ�, IP �ּҿ� �ش��ϴ� ����ȣ��Ʈ���� ù��° ���� ����Ѵ�.

��������� ó���� ���� ����ȣ��Ʈ�� �⺻ ����ȣ��Ʈ�� �ȴ�. IP �ּҰ� NameVirtualHost ���þ �ش��ϸ�, �ּ����� DocumentRoot�� ����� ������� �ʴ´�. Ư�� ����ȣ��Ʈ�� �ش������ʴ� ��û�� �����Ϸ��� ������ <VirtualHost>�� ��� �������Ͽ��� ���� �������� �ϸ� �ȴ�.

top

������ �������� ȣȯ

�̹� �������� �̸���� ����ȣ��Ʈ�� �ùٷ� �����ϱ����� �ʿ��� ������ �������ʴ� Ŭ���̾�Ʈ�� �ִ�. �̷� Ŭ���̾�Ʈ�� �׻� ��û�� IP �ּҿ� ���� ù��°�� ������ ����ȣ��Ʈ (������ �̸���� ����ȣ��Ʈ)�� �����Ѵ�.

�󸶳� ������ ���� ���ϴ°�?

���⼭ �����Ǿ����� ������ ����� ������ ���� ���Ѵ�. ���ó� �̷� �������� ����� ���� ���Ǿ���. ���� �������� ��� �̸���� ����ȣ��Ʈ�� �ʿ��� Host ����� ������.

�� ������ �ణ �����彺������ ServerPath ���þ�� �ذ��� �� �ִ�:

���� ��:

NameVirtualHost 111.22.33.44

<VirtualHost 111.22.33.44>
ServerName www.domain.tld
ServerPath /domain
DocumentRoot /web/domain
</VirtualHost>

�̰� ���� ���ΰ�? "/domain"�� �����ϴ� URI�� ���� ��û�� ����ȣ��Ʈ www.domain.tld�� �����Ѵ�. ��, Host: ����� ������ Ŭ���̾�Ʈ�� http://www.domain.tld/�����ε� ������ �� ������, http://www.domain.tld/domain/���δ� ��� Ŭ���̾�Ʈ�� �������� ������ �� �ִ�.

�̸� ���� ������ ����ȣ��Ʈ�� �ִ� �������� http://www.domain.tld/domain/���� ���� ��ũ�� �ִ´�. �׸��� ����ȣ��Ʈ ������������ ��븵ũ (���� ���, "file.html" �̳� "../icons/image.gif") Ȥ�� ("http://www.domain.tld/domain/misc/file.html"�̳� "/domain/misc/file.html"�� ����) �տ� /domain/�� ���� ��ũ���� ����Ѵ�.

���� ��Ģ�� �ʿ������� �� ��Ģ�� ������ ��κ��� ��� ���� ���̳� ������ ���̳� ������� ��� �������� �������� �� �� �ִ�.

������ ���:  de  |  en  |  fr  |  ja  |  ko  |  tr 

top

Comments

Notice:
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 mailing lists.