Apache HTTP Server Version 2.2
This document refers to a legacy release (2.2) of Apache httpd. The active release (2.4) is documented here. If you have not already upgraded, please follow this link for more information.
You may follow this link to go to the current version of this document.
IP±â¹ÝÀ̶õ ¸»ÀÌ ÀǹÌÇϵíÀÌ ¼¹ö´Â IP±â¹Ý °¡»óÈ£½ºÆ® °¢°¢¿¡ ´ëÇØ ´Ù¸¥ IP ÁÖ¼Ò¸¦ °¡Á®¾ßÇÑ´Ù. ÀÌ´Â ÄÄÇ»Å͸¦ ¹°¸®ÀûÀ¸·Î ¿©·¯ ³×Æ®¿÷¿¡ ¿¬°áÇϰųª, ÃÖ±Ù ¿î¿µÃ¼Á¦¿¡¼ Áö¿øÇÏ´Â °¡»ó ÀÎÅÍÆäÀ̽º¸¦ (ÀÚ¼¼ÇÑ ³»¿ëÀº ½Ã½ºÅÛ ¹®¼¸¦ Âü°íÇ϶ó. ÈçÈ÷ "ip aliases"¶ó°í Çϸç, º¸Åë "ifconfig" ¸í·É¾î·Î ¸¸µç´Ù) »ç¿ëÇÏ¿© °¡´ÉÇÏ´Ù.
¿©·¯ È£½ºÆ®¸¦ Áö¿øÇϵµ·Ï ¾ÆÆÄÄ¡¸¦ ¼³Á¤ÇÏ´Â ¹æ¹ýÀº µÎ°¡Áö´Ù. Çϳª´Â °¢ È£½ºÆ®¸¶´Ù º°µµÀÇ À¥¼¹ö¸¦ ½ÇÇàÇÏ´Â ¹ýÀÌ°í, ´Ù¸¥ Çϳª´Â ¸ðµç °¡»óÈ£½ºÆ®¸¦ Áö¿øÇÏ´Â ¼¹ö ÇÑ°³¸¦ ½ÇÇàÇÏ´Â ¹æ¹ýÀÌ´Ù.
¾ðÁ¦ ¿©·¯ ¼¹ö¸¦ »ç¿ëÇϳª:
User
, Group
, Listen
, ServerRoot
¼³Á¤À¸·Î ½ÇÇàÇØ¾ß ÇÑ´Ù.Listen
ÇÒ ¼ö¸¸ ÀÖ´Ù. ±×·¡¼
¾î¶² ÀÌÀ¯¿¡¼°Ç ƯÁ¤ ÁÖ¼Ò¸¦ ±â´Ù¸± ÇÊ¿ä°¡ ÀÖ´Ù¸é, (ÇÑ
À¥¼¹ö°¡ ÇÑ ÁÖ¼Ò¸¦ Á¦¿ÜÇÑ ¸ðµç ÁÖ¼Ò¸¦ ±â´Ù¸®°í ´Ù¸¥ ÇÑ
À¥¼¹ö°¡ Á¦¿ÜÇÑ ÁÖ¼Ò¸¦ ±â´Ù¸± ¼ö ÀÖÁö¸¸) ÁöÁ¤ÇÑ ÁÖ¼Ò
¸ðµÎ¸¦ ±â´Ù·Á¾ß ÇÑ´Ù.¾ðÁ¦ ¼¹ö ÇÑ°³¸¦ »ç¿ëÇϳª:
°¢ °¡»óÈ£½ºÆ®º°·Î À¥¼¹ö¸¦ ¼³Ä¡ÇÑ´Ù. ¼³Á¤ÆÄÀÏÀÇ
Listen
Áö½Ã¾î¿¡
¼¹ö°¡ ¼ºñ½ºÇÒ IP ÁÖ¼Ò(ȤÀº °¡»óÈ£½ºÆ®)¸¦ Àû¾îÁØ´Ù. ¿¹¸¦
µé¸é,
Listen www.smallco.com:80
È£½ºÆ®¸í º¸´Ù´Â IP ÁÖ¼Ò¸¦ »ç¿ëÇÏ±æ ¹Ù¶õ´Ù. (DNS ¹®Á¦ Âü°í)
ÀÌ °æ¿ì À¥¼¹ö ÇÑ°³·Î ÁÖ¼¹ö¿Í ¸ðµç °¡»óÈ£½ºÆ®¿¡ ´ëÇÑ
¿äûÀ» ¼ºñ½ºÇÑ´Ù. ¼³Á¤ÆÄÀÏÀÇ VirtualHost
Áö½Ã¾î¿¡ °¡»óÈ£½ºÆ®¸¶´Ù
´Ù¸¥ ServerAdmin
,
ServerName
, DocumentRoot
, ErrorLog
, TransferLog
,
CustomLog
Áö½Ã¾î °ªÀ» ¼³Á¤ÇÑ´Ù. ¿¹¸¦ µé¸é,
<VirtualHost www.smallco.com>
ServerAdmin webmaster@mail.smallco.com
DocumentRoot /groups/smallco/www
ServerName www.smallco.com
ErrorLog /groups/smallco/logs/error_log
TransferLog /groups/smallco/logs/access_log
</VirtualHost>
<VirtualHost www.baygroup.org>
ServerAdmin webmaster@mail.baygroup.org
DocumentRoot /groups/baygroup/www
ServerName www.baygroup.org
ErrorLog /groups/baygroup/logs/error_log
TransferLog /groups/baygroup/logs/access_log
</VirtualHost>
È£½ºÆ®¸í º¸´Ù´Â IP ÁÖ¼Ò¸¦ »ç¿ëÇÏ±æ ¹Ù¶õ´Ù. (DNS ¹®Á¦ Âü°í)
VirtualHost Áö½Ã¾î ¾È¿¡¼´Â ÇÁ·Î¼¼½º »ý¼º°ú ±âŸ ¸î¸î Áö½Ã¾î¸¦ Á¦¿ÜÇÏ°í °ÅÀÇ ¸ðµç ¼³Á¤Áö½Ã¾î¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. VirtualHost Áö½Ã¾î ¾È¿¡¼ Áö½Ã¾î¸¦ »ç¿ëÇÒ ¼ö ÀÖ´ÂÁö ¾Ë·Á¸é Áö½Ã¾î ¸ñ·Ï¿¡¼ »ç¿ëÀå¼Ò¸¦ È®ÀÎÇ϶ó.
suEXEC ÇÁ·Î±×·¥À»
»ç¿ëÇÑ´Ù¸é VirtualHost Áö½Ã¾î ¾È¿¡ User
¿Í Group
À» »ç¿ëÇÒ ¼ö ÀÖ´Ù.
º¸¾È: ¼¹ö¸¦ ½ÇÇàÇÏ´Â »ç¿ëÀÚ¿Ü¿¡ ´Ù¸¥ »ç¶÷¿¡°Ô ·Î±×ÆÄÀÏÀÌ ÀÖ´Â µð·ºÅ丮ÀÇ ¾²±â±ÇÇÑÀÌ ÀÖ´Ù¸é º¸¾È ¹®Á¦¸¦ Á¶½ÉÇ϶ó. ÀÚ¼¼ÇÑ ³»¿ëÀº º¸¾È ÆÁÀ» Âü°íÇ϶ó.