From fe39ffb8b90ae4e002ed73fe98617cd590abb467 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 08:33:50 +0200 Subject: Adding upstream version 2.4.56. Signed-off-by: Daniel Baumann --- docs/manual/vhosts/examples.html.ko.euc-kr | 657 +++++++++++++++++++++++++++++ 1 file changed, 657 insertions(+) create mode 100644 docs/manual/vhosts/examples.html.ko.euc-kr (limited to 'docs/manual/vhosts/examples.html.ko.euc-kr') diff --git a/docs/manual/vhosts/examples.html.ko.euc-kr b/docs/manual/vhosts/examples.html.ko.euc-kr new file mode 100644 index 0000000..ebe9e0c --- /dev/null +++ b/docs/manual/vhosts/examples.html.ko.euc-kr @@ -0,0 +1,657 @@ + + + + + +°¡»óÈ£½ºÆ® ¿¹ - Apache HTTP Server Version 2.4 + + + + + + + +
<-
+

°¡»óÈ£½ºÆ® ¿¹

+
+

°¡´ÉÇÑ ¾ð¾î:  en  | + fr  | + ja  | + ko  | + tr 

+
+
ÀÌ ¹®¼­´Â ÃÖ½ÅÆÇ ¹ø¿ªÀÌ ¾Æ´Õ´Ï´Ù. + ÃÖ±Ù¿¡ º¯°æµÈ ³»¿ëÀº ¿µ¾î ¹®¼­¸¦ Âü°íÇϼ¼¿ä.
+ + +

ÀÌ ¹®¼­´Â ÀÚÁÖ ¹®ÀǵǴ °¡»óÈ£½ºÆ® + Áú¹®¿¡ ´äÀ» ÇÏ·Á°í ¾²¿©Á³´Ù. »óȲÀº À̸§±â¹ÝÀ̳ª IP±â¹Ý °¡»óÈ£½ºÆ®¸¦ ÅëÇØ ÇÑ ¼­¹ö¿¡¼­ + ¿©·¯ À¥»çÀÌÆ®¸¦ ¼­ºñ½ºÇÏ·Á´Â °æ¿ìÀÌ´Ù. ÇÑ ÇÁ·Ï½Ã ¼­¹ö µÚ¿¡¼­ + ¿©·¯ ¼­¹ö¸¦ »ç¿ëÇÏ¿© »çÀÌÆ®¸¦ ¿î¿µÇÏ´Â °æ¿ì¸¦ ´Ù·é ¹®¼­µµ + °ð ³ª¿Ã °ÍÀÌ´Ù.

+ +
+ +
top
+
+

IP ÁÖ¼Ò ÇÑ°³¿¡ ¿©·¯ À̸§±â¹Ý + À¥»çÀÌÆ® ¿î¿µÇϱâ.

+ +

¼­¹ö¿¡ IP ÁÖ¼Ò°¡ ÇÑ°³ ÀÖ°í, DNS¿¡¼­ ¿©·¯ ÁÖ¼Ò(CNAMES)°¡ + ÀÌ ÄÄÇ»Å͸¦ °¡¸®Å²´Ù. ÀÌ ÄÄÇ»ÅÍ¿¡¼­ www.example.com°ú + www.example.orgÀÇ À¥¼­¹ö¸¦ ½ÇÇàÇÏ°í ½Í´Ù.

+ +

Note

¾ÆÆÄÄ¡ ¼­¹ö¿¡ °¡»óÈ£½ºÆ® ¼³Á¤À» + ÇÑ´Ù°í ±× È£½ºÆ®¸í¿¡ ´ëÇÑ DNS Ç׸ñÀÌ ÀÚµ¿ÀÌ·Î »ý¼ºµÇÁö + ¾Ê´Â´Ù. ¹Ýµå½Ã DNS¿¡ IP ÁÖ¼Ò¸¦ °¡¸®Å°´Â + À̸§ÀÌ ÀÖ¾î¾ß ÇÑ´Ù. ¾È±×·¯¸é ¾Æ¹«µµ À¥»çÀÌÆ®¸¦ º¼ + ¼ö ¾ø´Ù. °Ë»çÇغ¸±â À§ÇØ hosts ÆÄÀÏ¿¡ Ç׸ñÀ» + Ãß°¡ÇÒ ¼ö ÀÖÁö¸¸, ÀÌ´Â hosts Ç׸ñÀ» °¡Áø ÄÄÇ»ÅÍ¿¡¸¸ + ¹Ý¿µµÈ´Ù.

+
+ +

¼­¹ö ¼³Á¤

+ + + # ¾ÆÆÄÄ¡°¡ Æ÷Æ® 80À» ±â´Ù¸°´Ù
+ Listen 80
+
+ # ¸ðµç IP ÁÖ¼Ò¿¡¼­ °¡»óÈ£½ºÆ® ¿äûÀ» ±â´Ù¸°´Ù
+ NameVirtualHost *:80
+
+ <VirtualHost *:80>
+ + DocumentRoot /www/example1
+ ServerName www.example.com
+
+ # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù
+
+
+ </VirtualHost>
+
+ <VirtualHost *:80>
+ + DocumentRoot /www/example2
+ ServerName www.example.org
+
+ # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù
+
+
+ </VirtualHost> +

+ +

º°Ç¥´Â ¸ðµç ÁÖ¼Ò¸¦ °¡¸®Å°¹Ç·Î, ÁÖ¼­¹ö´Â ¾î¶² ¿äûµµ + ¼­ºñ½ºÇÏÁö ¾Ê´Â´Ù. www.example.comÀÌ + ¼³Á¤ÆÄÀÏ¿¡ óÀ½À¸·Î ³ª¿À¹Ç·Î °¡Àå ³ôÀº ¿ì¼±¼øÀ§¸¦ °¡Áö¸ç, + ±âº»È¤Àº Ãʱ⠼­¹ö°¡ µÈ´Ù. + ¾î¶² ServerName Áö½Ã¾î¿¡µµ ÇØ´çµÇÁö¾Ê´Â ¿äûÀº + ù¹ø° VirtualHost°¡ ¼­ºñ½ºÇÑ´Ù.

+ +
+

ÁÖÀÇ

+ +

¿øÇÑ´Ù¸é * ´ë½Å ½Ã½ºÅÛÀÇ ½ÇÁ¦ IP + ÁÖ¼Ò¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. ÀÌ °æ¿ì + VirtualHostÀÇ ¾Æ±Ô¸ÕÆ®´Â + NameVirtualHostÀÇ ¾Æ±Ô¸ÕÆ®¿Í ÀÏÄ¡ÇØ¾ß + ÇÑ´Ù:

+ +

+ NameVirtualHost 172.20.30.40
+
+ <VirtualHost 172.20.30.40>
+ # »ý·« ... +

+ +

±×·¯³ª ISP¿¡¼­ µ¿ÀûÀ¸·Î IP ÁÖ¼Ò¸¦ °¡Á®¿À´Â µî + IP ÁÖ¼Ò¸¦ ¸ð¸£´Â °æ¿ì¿¡´Â *¸¦ »ç¿ëÇÏ´Â + °ÍÀÌ À¯¿ëÇÏ´Ù. *´Â ¸ðµç IP ÁÖ¼Ò¿¡ + ÇØ´çÇϹǷÎ, IP ÁÖ¼Ò°¡ º¯°æµÇ¾îµµ ¼³Á¤À» º¯°æÇÒ + ÇÊ¿ä°¡ ¾ø´Ù.

+
+ +

°ÅÀÇ ´ëºÎºÐÀÇ À̸§±â¹Ý °¡»óÈ£½ºÆ® ¼³Á¤Àº À§¿Í °°´Ù. + ¿¹¿Ü´Â ´Ù¸¥ IP ÁÖ¼Ò³ª Æ÷Æ®·Î ´Ù¸¥ ³»¿ëÀ» ¼­ºñ½ºÇÏ·Á´Â + °æ¿ìÀÌ´Ù.

+ +
top
+
+

¿©·¯ IP ÁÖ¼Ò¿¡¼­ À̸§±â¹Ý + È£½ºÆ®.

+ +
+

ÁÖÀÇ

¿©±â¼­ ¼³¸íÇÑ ¹æ¹ýÀº IP ÁÖ¼Ò°¡ + ¸î°³¶óµµ Àû¿ë°¡´ÉÇÏ´Ù.

+
+ +

¼­¹ö´Â IP ÁÖ¼Ò°¡ µÎ°³ÀÖ´Ù. Çϳª¿¡¼­ + (172.20.30.40) "ÁÖ" ¼­¹ö + server.domain.comÀ» ¼­ºñ½ºÇÏ°í, ´Ù¸¥ Çϳª¿¡¼­ + (172.20.30.50) ¿©·¯ °¡»óÈ£½ºÆ®¸¦ ¼­ºñ½ºÇÒ + °ÍÀÌ´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + Listen 80
+
+ # 172.20.30.40¿¡¼­ ½ÇÇàÇÏ´Â "ÁÖ"¼­¹öÀÌ´Ù
+ ServerName server.domain.com
+ DocumentRoot /www/mainserver
+
+ # ´Ù¸¥ ÁÖ¼Ò´Ù
+ NameVirtualHost 172.20.30.50
+
+ <VirtualHost 172.20.30.50>
+ + DocumentRoot /www/example1
+ ServerName www.example.com
+
+ # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù ...
+
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.50>
+ + DocumentRoot /www/example2
+ ServerName www.example.org
+
+ # ´Ù¸¥ Áö½Ã¾îµéµµ ÀÖ´Ù ...
+
+
+ </VirtualHost> +

+ +

172.20.30.50ÀÌ ¾Æ´Ñ ÁÖ¼Ò¿¡ ´ëÇÑ ¿äûÀº + ÁÖ¼­¹ö°¡ ¼­ºñ½ºÇÑ´Ù. È£½ºÆ®¸í ¾øÀÌ, Áï Host: + Çì´õ¾øÀÌ 172.20.30.50·Î ¿äûÇϸé + www.example.comÀÌ ¼­ºñ½ºÇÑ´Ù.

+ +
top
+
+

(³»ºÎ¿Í ¿ÜºÎ ÁÖ¼Ò¿Í °°ÀÌ) + ´Ù¸¥ IP ÁÖ¼Ò·Î °°Àº ³»¿ëÀ» ¼­ºñ½ºÇϱâ.

+ +

¼­¹ö ÄÄÇ»ÅÍ¿¡ IP ÁÖ¼Ò°¡ µÎ°³ (192.168.1.1°ú + 172.20.30.40) ÀÖ´Ù. ÄÄÇ»ÅÍ´Â ³»ºÎ (ÀÎÆ®¶ó³Ý) + ³×Æ®¿÷°ú ¿ÜºÎ (ÀÎÅͳÝ) ³×Æ®¿÷ »çÀÌ¿¡ À§Ä¡ÇÑ´Ù. ³×Æ®¿÷ ¹Û¿¡¼­ + server.example.comÀº ¿ÜºÎ ÁÖ¼Ò¸¦ + (172.20.30.40) ÀǹÌÇÏ°í, ³×Æ®¿÷ ³»ºÎ¿¡¼­ °°Àº + À̸§À» ³»ºÎ ÁÖ¼Ò·Î (192.168.1.1) »ç¿ëÇÑ´Ù.

+ +

¼­¹ö´Â VirtualHost ¼½¼Ç ÇÑ°³·Î ³»ºÎ¿Í ¿ÜºÎ + ÀÀ´ä¿¡ °°Àº ³»¿ëÀ» ¼­ºñ½ºÇÒ ¼ö ÀÖ´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + NameVirtualHost 192.168.1.1
+ NameVirtualHost 172.20.30.40
+
+ <VirtualHost 192.168.1.1 172.20.30.40>
+ + DocumentRoot /www/server1
+ ServerName server.example.com
+ ServerAlias server
+
+ </VirtualHost> +

+ +

ÀÌÁ¦ µÎ ³×Æ®¿÷¿¡¼­ µé¾î¿Â ¿äûÀ» °°Àº + VirtualHost¿¡¼­ ¼­ºñ½ºÇÑ´Ù.

+ +
+

ÁÖÀÇ:

³»ºÎ ³×Æ®¿÷¿¡¼­´Â ¿ÏÀüÇÑ È£½ºÆ®¸í + server.example.com ´ë½Å À̸§ + serverµµ °¡´ÉÇÏ´Ù.

+ +

¶ÇÇÑ À§ÀÇ ¿¹¿¡¼­ IP ÁÖ¼Ò ´ë½Å *À» + »ç¿ëÇÏ¿© ¼­¹ö°¡ ¸ðµç ÁÖ¼Ò¿¡ µ¿ÀÏÇÏ°Ô µ¿ÀÛÇÒ ¼ö + ÀÖ´Ù.

+
+ +
top
+
+

¿©·¯ Æ÷Æ®¿¡¼­ ¼­·Î ´Ù¸¥ »çÀÌÆ® + ¿î¿µÇϱâ.

+ +

°°Àº IPÀÇ ¿©·¯ Æ÷Æ®¿¡¼­ ¼­·Î ´Ù¸¥ µµ¸ÞÀÎÀ» ¼­ºñ½ºÇÑ´Ù°í + °¡Á¤ÇÏÀÚ. ÀÌ´Â "NameVirtualHost" ű׿¡ Æ÷Æ®¸¦ Á¤ÀÇÇϸé + °¡´ÉÇÏ´Ù. NameVirtualHost name:port¾øÀÌ <VirtualHost + name:port>¸¸ ȤÀº Listen Áö½Ã¾î¸¸ »ç¿ëÇÏ¸é ¾ÈµÈ´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + Listen 80
+ Listen 8080
+
+ NameVirtualHost 172.20.30.40:80
+ NameVirtualHost 172.20.30.40:8080
+
+ <VirtualHost 172.20.30.40:80>
+ + ServerName www.example.com
+ DocumentRoot /www/domain-80
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40:8080>
+ + ServerName www.example.com
+ DocumentRoot /www/domain-8080
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40:80>
+ + ServerName www.example.org
+ DocumentRoot /www/otherdomain-80
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40:8080>
+ + ServerName www.example.org
+ DocumentRoot /www/otherdomain-8080
+
+ </VirtualHost> +

+ +
top
+
+

IP±â¹Ý °¡»óÈ£½ºÆ®

+ +

¼­¹ö´Â °¢°¢ www.example.com°ú + www.example.org¿¡ ÇØ´çÇÏ´Â µÎ IP ÁÖ¼Ò¸¦ + (172.20.30.40°ú 172.20.30.50) + °¡Áø´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + Listen 80
+
+ <VirtualHost 172.20.30.40>
+ + DocumentRoot /www/example1
+ ServerName www.example.com
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.50>
+ + DocumentRoot /www/example2
+ ServerName www.example.org
+
+ </VirtualHost> +

+ +

<VirtualHost> Áö½Ã¾î·Î ÁöÁ¤ÇÑ ÁÖ¼Ò¿¡ + ÇØ´çÇÏÁö¾Ê´Â ÁÖ¼Ò·Î (¿¹¸¦ µé¾î, localhost) + ¿äûÀÌ µé¾î¿À¸é ÁÖ¼­¹ö°¡ ÀÖ´Â °æ¿ì ÁÖ¼­¹ö°¡ ¼­ºñ½ºÇÑ´Ù.

+ +
top
+
+

Æ÷Æ®±â¹Ý°ú ip±â¹ÝÀÌ È¥ÇÕµÈ + °¡»óÈ£½ºÆ®

+ +

¼­¹ö´Â °¢°¢ www.example.com°ú + www.example.org¿¡ ÇØ´çÇÏ´Â µÎ IP ÁÖ¼Ò¸¦ + (172.20.30.40°ú 172.20.30.50) + °¡Áø´Ù. °¢ IPÀÇ 80¹ø°ú 8080¹ø Æ÷Æ®¿¡ °¡»óÈ£½ºÆ®¸¦ µ¹¸°´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + Listen 172.20.30.40:80
+ Listen 172.20.30.40:8080
+ Listen 172.20.30.50:80
+ Listen 172.20.30.50:8080
+
+ <VirtualHost 172.20.30.40:80>
+ + DocumentRoot /www/example1-80
+ ServerName www.example.com
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40:8080>
+ + DocumentRoot /www/example1-8080
+ ServerName www.example.com
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.50:80>
+ + DocumentRoot /www/example2-80
+ ServerName www.example.org
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.50:8080>
+ + DocumentRoot /www/example2-8080
+ ServerName www.example.org
+
+ </VirtualHost> +

+ +
top
+
+

À̸§±â¹Ý°ú IP±â¹ÝÀÌ È¥ÇÕµÈ + °¡»óÈ£½ºÆ®

+ +

ÁÖ¼ÒÁß ¸î¸îÀº À̸§±â¹Ý °¡»óÈ£½ºÆ®·Î, ´Ù¸¥ °ÍÀº IP±â¹Ý + °¡»óÈ£½ºÆ®·Î ¼­ºñ½ºÇÏ°í ½Í´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + Listen 80
+
+ NameVirtualHost 172.20.30.40
+
+ <VirtualHost 172.20.30.40>
+ + DocumentRoot /www/example1
+ ServerName www.example.com
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40>
+ + DocumentRoot /www/example2
+ ServerName www.example.org
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40>
+ + DocumentRoot /www/example3
+ ServerName www.example3.net
+
+ </VirtualHost>
+
+ # IP-±â¹Ý
+ <VirtualHost 172.20.30.50>
+ + DocumentRoot /www/example4
+ ServerName www.example4.edu
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.60>
+ + DocumentRoot /www/example5
+ ServerName www.example5.gov
+
+ </VirtualHost> +

+ +
top
+
+

_default_ °¡»óÈ£½ºÆ® + »ç¿ëÇϱâ

+ +

¸ðµç Æ÷Æ®¿¡ ´ëÇÑ + _default_ °¡»óÈ£½ºÆ®

+ +

¾î¶² °¡»óÈ£½ºÆ®¿¡µµ ÇØ´çÇÏÁö¾ÊÀº IP ÁÖ¼Ò¿Í Æ÷Æ®¿¡ ´ëÇÑ + ¸ðµç ¿äûÀ» ó¸®Çϱâ.

+ +

¼­¹ö ¼³Á¤

+ + + <VirtualHost _default_:*>
+ + DocumentRoot /www/default
+
+ </VirtualHost> +

+ +

default(±âº») °¡»óÈ£½ºÆ®ÀÇ Æ÷Æ®·Î ¿ÍÀϵåÄ«µå¸¦ »ç¿ëÇÏ¿© ¾î¶² ¿äûµµ + ÁÖ¼­¹ö·Î ¸ø°¡µµ·Ï ¸¸µç´Ù.

+ +

default °¡»óÈ£½ºÆ®´Â Àý´ë·Î À̸§±â¹Ý °¡»óÈ£½ºÆ®°¡ »ç¿ëÇÏ´Â + ÁÖ¼Ò/Æ÷Æ®·ÎÀÇ ¿äûÀ» ¼­ºñ½ºÇÏÁö ¾Ê´Â´Ù. ¾Ë ¼ö ¾ø°Å³ª + Host: Çì´õ°¡ »ý·«µÈ ¿äûÀº Ç×»ó ÃÖÃÊÀÇ À̸§±â¹Ý + °¡»óÈ£½ºÆ®(¼³Á¤ÆÄÀÏ¿¡¼­ + ÁÖ¼Ò/Æ÷Æ®°¡ óÀ½À¸·Î ³ª¿Â °¡»óÈ£½ºÆ®)°¡ ¼­ºñ½ºÇÑ´Ù.

+ +

AliasMatch³ª + RewriteRuleÀ» + »ç¿ëÇÏ¿© ¾î¶² ¿äûÀ» ƯÁ¤ ÆäÀÌÁö(ȤÀº ½ºÅ©¸³Æ®)·Î + ÀçÀÛ¼ºÇÒ(rewrite) ¼ö ÀÖ´Ù.

+ + +

¿©·¯ Æ÷Æ®¿¡ ´ëÇÑ + _default_ °¡»óÈ£½ºÆ®

+ +

À§ÀÇ °æ¿ì¿Í °°Áö¸¸, ¼­¹ö´Â ¿©·¯ Æ÷Æ®¸¦ ±â´Ù¸®°í 80¹ø + Æ÷Æ®¿¡ ´ëÇؼ­ Ãß°¡·Î _default_ °¡»óÈ£½ºÆ®¸¦ + »ç¿ëÇÏ°í ½Í´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + <VirtualHost _default_:80>
+ + DocumentRoot /www/default80
+ # ...
+
+ </VirtualHost>
+
+ <VirtualHost _default_:*>
+ + DocumentRoot /www/default
+ # ...
+
+ </VirtualHost> +

+ +

80¹ø Æ÷Æ®¿¡ ´ëÇÑ default °¡»óÈ£½ºÆ®´Â (¹Ýµå½Ã + ¿ÍÀϵåÄ«µå Æ÷Æ®¸¦ °¡Áø ±âº» °¡»óÈ£½ºÆ® ÀÌÀü¿¡ ³ª¿Í¾ß ÇÑ´Ù) + ÁöÁ¤ÇÏÁö¾ÊÀº IP ÁÖ¼Ò·Î º¸³»Áø ¸ðµç ¿äûÀ» ¼­ºñ½ºÇÑ´Ù. + ÁÖ¼­¹ö´Â Àý´ë·Î ¿äûÀ» ¼­ºñ½ºÇÏÁö ¸øÇÑ´Ù.

+ + +

ÇÑ Æ÷Æ®¿¡ ´ëÇÑ + _default_ °¡»óÈ£½ºÆ®

+ +

80¹ø Æ÷Æ®¿¡ ´ëÇؼ­¸¸ default °¡»óÈ£½ºÆ®¸¦ ¸¸µé°í ½Í´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + <VirtualHost _default_:80>
+ DocumentRoot /www/default
+ ...
+ </VirtualHost> +

+ +

Æ÷Æ® 80¹ø¿¡ ÁöÁ¤ÇÏÁö¾ÊÀº ÁÖ¼Ò¿¡ ´ëÇÑ ¿äûÀº ±âº» + °¡»óÈ£½ºÆ®°¡ ¼­ºñ½ºÇÏ°í, ´Ù¸¥ ÁöÁ¤ÇÏÁö¾ÊÀº ÁÖ¼Ò¿Í Æ÷Æ®¸¦ + °¡Áø ¿äûÀº ÁÖ ¼­¹ö°¡ ¼­ºñ½ºÇÑ´Ù.

+ + +
top
+
+

À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ IP±â¹Ý + °¡»óÈ£½ºÆ®·Î ¿Å±â±â

+ +

(À̸§±â¹ÝÀÇ Ã¹¹ø° ¿¹¿¡¼­) È£½ºÆ®¸í + www.example.org¿¡ ´ëÇÑ À̸§±â¹Ý °¡»óÈ£½ºÆ®´Â + ÀÚ½ÅÀÇ IP ÁÖ¼Ò¸¦ °¡Á®¾ß ÇÑ´Ù. À̸§±â¹Ý °¡»óÈ£½ºÆ®ÀÇ ÀÌÀü + IP ÁÖ¼Ò¸¦ ij½ÌÇÏ´Â ³×ÀÓ¼­¹ö³ª ÇÁ·Ï½Ã¿ÍÀÇ ¹®Á¦¸¦ ÇÇÇϱâÀ§ÇØ + ¿Å±â´Â µ¿¾È µÑ ¸ðµÎ¸¦ ¼­ºñ½ºÇÏ°í ½Í´Ù.

+ +

+ ¹æ¹ýÀº VirtualHost Áö½Ã¾î¿¡ »õ IP ÁÖ¼Ò¸¸À» + (172.20.30.50) Ãß°¡ÇϸéµÇ¹Ç·Î ½±´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + Listen 80
+ ServerName www.example.com
+ DocumentRoot /www/example1
+
+ NameVirtualHost 172.20.30.40
+
+ <VirtualHost 172.20.30.40 172.20.30.50>
+ + DocumentRoot /www/example2
+ ServerName www.example.org
+ # ...
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40>
+ + DocumentRoot /www/example3
+ ServerName www.example.net
+ ServerAlias *.example.net
+ # ...
+
+ </VirtualHost> +

+ +

ÀÌÁ¦ (IP±â¹Ý °¡»óÈ£½ºÆ®¸¦ ÅëÇÑ) »õ·Î¿î ÁÖ¼Ò¿Í (À̸§±â¹Ý + °¡»óÈ£½ºÆ®¸¦ ÅëÇÑ) ÀÌÀü ÁÖ¼Ò ¸ðµÎ °¡»óÈ£½ºÆ®¿¡ Á¢±ÙÇÒ + ¼ö ÀÖ´Ù.

+ +
top
+
+

ServerPath + Áö½Ã¾î »ç¿ëÇϱâ

+ +

µÎ À̸§±â¹Ý °¡»óÈ£½ºÆ®¸¦ °¡Áø ¼­¹ö°¡ ÀÖ´Ù. ¿Ã¹Ù¸¥ + °¡»óÈ£½ºÆ®¸¦ ¼±ÅÃÇϱâÀ§ÇØ Å¬¶óÀ̾ðÆ®´Â ¿Ã¹Ù¸¥ + Host: Çì´õ¸¦ º¸³»¾ß ÇÑ´Ù. ¿À·¡µÈ HTTP/1.0 + Ŭ¶óÀ̾ðÆ®°¡ ÀÌ Çì´õ¸¦ º¸³»Áö ¸øÇÏ¸é ¾ÆÆÄÄ¡´Â Ŭ¶óÀ̾ðÆ®°¡ + ¾î¶² °¡»óÈ£½ºÆ®¸¦ º¸·Á°íÇÏ´ÂÁö ¾Ë ¼ö ¾ø´Ù (±×·¡¼­ ÃÖÃÊÀÇ + °¡»óÈ£½ºÆ®°¡ ¿äûÀ» ¼­ºñ½ºÇÑ´Ù). ¿À·¡µÈ ºê¶ó¿ìÀú¿Í °¡´ÉÇÑ È£È¯À» + À¯ÁöÇϱâÀ§ÇØ ÃÖÃÊÀÇ °¡»óÈ£½ºÆ®¸¦ ¸¸µé°í, ¿©±â¿¡ À̸§±â¹Ý + °¡»óÈ£½ºÆ®ÀÇ URL Á¢µÎ»ç¸¦ Æ÷ÇÔÇÏ´Â ¸µÅ© ¸ñ·Ï ÆäÀÌÁö¸¦ + µÐ´Ù.

+ +

¼­¹ö ¼³Á¤

+ + + NameVirtualHost 172.20.30.40
+
+ <VirtualHost 172.20.30.40>
+ + # primary vhost
+ DocumentRoot /www/subdomain
+ RewriteEngine On
+ RewriteRule ^/.* /www/subdomain/index.html
+ # ...
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40>
+ DocumentRoot /www/subdomain/sub1
+ + ServerName www.sub1.domain.tld
+ ServerPath /sub1/
+ RewriteEngine On
+ RewriteRule ^(/sub1/.*) /www/subdomain$1
+ # ...
+
+ </VirtualHost>
+
+ <VirtualHost 172.20.30.40>
+ + DocumentRoot /www/subdomain/sub2
+ ServerName www.sub2.domain.tld
+ ServerPath /sub2/
+ RewriteEngine On
+ RewriteRule ^(/sub2/.*) /www/subdomain$1
+ # ...
+
+ </VirtualHost> +

+ +

ServerPath Áö½Ã¾î¶§¹®¿¡ + URL http://www.sub1.domain.tld/sub1/¿¡ ´ëÇÑ + ¿äûÀº Ç×»ó subl-°¡»óÈ£½ºÆ®°¡ ¼­ºñ½ºÇÑ´Ù.
+ Ŭ¶óÀ̾ðÆ®°¡ ¿Ã¹Ù¸¥ Host: Çì´õ¸¦ º¸³½´Ù¸é, + URL http://www.sub1.domain.tld/¿¡ ´ëÇÑ ¿äûÀº + subl-°¡»óÈ£½ºÆ®¿¡¼­¸¸ ¼­ºñ½ºÇÑ´Ù. ¸¸¾à Host: Çì´õ¸¦ + º¸³»Áö¾ÊÀ¸¸é Ŭ¶óÀ̾ðÆ®´Â ÃÖÃÊÀÇ È£½ºÆ®¿¡ ÀÖ´Â Á¤º¸ÆäÀÌÁö¸¦ + º¸°ÔµÈ´Ù.

+ +

¿©±â¿¡ ¹®Á¦°¡ ÀÖÀ½À» ÁÖÀÇÇ϶ó: Ŭ¶óÀ̾ðÆ®°¡ + Host: Çì´õ¸¦ º¸³»Áö¾ÊÀ¸¸é + http://www.sub2.domain.tld/sub1/¿¡ ´ëÇÑ ¿äûµµ + subl-°¡»óÈ£½ºÆ®°¡ ¼­ºñ½ºÇÑ´Ù.

+ +

RewriteRule + Áö½Ã¾î¸¦ »ç¿ëÇÏ¿© ¿Ã¹Ù¸¥ Host: Çì´õ¸¦ º¸³»´Â + Ŭ¶óÀ̾ðÆ®´Â (¿¹¸¦ µé¾î, URL ÀüÄ¡»ç°¡ Àְųª ¾ø´Â) + µÎ URLÀ» ¸ðµÎ »ç¿ëÇÒ ¼ö ÀÖ´Ù.

+ +
+
+

°¡´ÉÇÑ ¾ð¾î:  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.
+
+ \ No newline at end of file -- cgit v1.2.3