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ϱ ϶. , ⼭ IP ּҴ Ʈ ̽̾ Ѵ.

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

ȣƮ

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

www.domain.tld ϰ ־µ IP ּҿ www.otherdomain.tld ȣƮ ߰ϰ ʹٰ . httpd.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 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 Libera.chat, or sent to our mailing lists.