<?xml version="1.0" encoding="euc-kr" ?>
<?xml-stylesheet type="text/xsl" href="../okjsplec_c.xsl" ?>
<lecture>
	<title>Apache °¡»óÈ£½ºÆ® ¼³Á¤</title>
	<who>kenu</who>
	<when>2002-03-19 12:27¿ÀÀü</when>
	<what>
		<text>
		ÀÌ ¹®¼­´Â apache ¼­¹ö¿¡¼­ °¡»óÈ£½ºÆ®¸¦ »ç¿ëÇØ¼­ ¿©·¯°³ÀÇ µµ¸ÞÀÎÀ» »ç¿ëÇÏµµ·Ï ÇÏ´Â ¹æ¹ýÀ» ¼³¸íÇÕ´Ï´Ù. 
		ÆÄÀÏÀº apache ÀÇ conf µð·ºÅä¸®¿¡ ÀÖ´Â httpd.conf ÆÄÀÏ¸¸À» º¯°æÇÕ´Ï´Ù. apacheÀÇ ±âº»ÀûÀÎ ¼³Ä¡´Â Àß µÇ¾î ÀÖ´Ù°í °¡Á¤ÇÏ°í ´Ù¸¥ µµ¸ÞÀÎÀ» ºÙÀÌ´Â ¹ýÀ» ¼³¸íÇÕ´Ï´Ù. ¶ÇÇÑ DNS ¼­¹ö ¼³Á¤¿¡ °üÇØ¼­´Â ÀÌ ¹®¼­¿¡¼­ ¼³¸íÇÏÁö ¾Ê°Ú½À´Ï´Ù. È®Àå°­ÁÂ´Â tomcat 4.0.x ¿Í ¿¬µ¿ÇÏ´Â °­ÁÂÀÔ´Ï´Ù. 
		<¼Ò½º ÆÄÀÏ¸í="°­ÁÂÈ¯°æ">
OS:Solaris 2.8
Apache: 1.3.20
¼³Ä¡µð·ºÅä¸®: /usr/local/apache
		</¼Ò½º>
		</text>
	</what>

	<what>
		<text>ÁÖÀÇÇÒ Á¡Àº ºñ´Ü ¾ÆÆÄÄ¡¸¸ ÇØ´çµÇ´Â °ÍÀÌ ¾Æ´Õ´Ï´Ù¸¸, ¹öÀü¸¶´Ù È¯°æ¼³Á¤ÇÏ´Â °ÍÀÌ Â÷ÀÌ°¡ ÀÖÀ» °æ¿ì°¡ ¸¹±â ¶§¹®¿¡ °¡´ÉÇÏ¸é ÆÐÅ°Áö¿¡ Æ÷ÇÔµÈ Installation ¹®¼­¸¦ Ç¥ÁØÀ¸·Î ¼³Ä¡ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.
		</text>
	</what>
	<what>
        <text>Tomcat °ú ¿¬µ¿ÇÏ±â À§ÇØ¼­´Â DSO ¸ðµâÀ» »ç¿ëÇÏ´Â mode ·Î ¼³Ä¡°¡ µÇ¾î¾ß ÇÕ´Ï´Ù. 1.3.22 ¹öÀüºÎÅÍ´Â ÀÌ ¸ðµå·Î ¼³Ä¡°¡ µÇÁö¸¸ 1.3.21 ÀÌÀü ¹öÀüÀº ¾Æ·¡Ã³·³ ¼Ò½ºÆÄÀÏÀ» ÀÌ¿ëÇØ¼­ ¼³Ä¡¸¦ ÇØ¾ßµË´Ï´Ù. °¡´ÉÇÏ¸é 1.3.23 ÀÌÈÄ ¹öÀüÀ» ´Ù¿î¹Þ¾Æ¼­ ¼³Ä¡ÇÏ½Ê½Ã¿À. ¾Æ·¡ ¸í·É¾î¸¦ skip ÇÒ ¼ö ÀÖÀ¸´Ï±î¿ä. ¾Æ·¡ ¸í·É¾î´Â unix °è¿­¿¡¼­¸¸ »ç¿ëÇÏ´Â ¸í·É¾îÀÔ´Ï´Ù. windows ÀÇ °æ¿ì ÆÐÅ°Áö¿¡ Æ÷ÇÔµÈ ¹®¼­¸¦ º¸¼¼¿ä. \ ´Â ÁÙÀÌ ±æ¾îÁú ¶§ ¿£ÅÍ¸¦ ÃÄµµ ½ÇÇàÀÌ ¾ÈµÇµµ·Ï ÇÏ´Â ÀÌÀ½ ¹®ÀÚÀÔ´Ï´Ù.
		<¼Ò½º ÆÄÀÏ¸í="apache ÄÄÆÄÀÏ ¸í·ÉÁÙ">
./configure --prefix=/usr/local/apache \ 
            --enable-shared=max \
            --enable-rule=SHARED_CORE \ 
            --enable-module=so
		</¼Ò½º>
		</text>
	</what>
	<what>
		<text>
        conf µð·ºÅä¸®¿¡ ÀÖ´Â httpd.conf ÆÄÀÏÀ» ¿­¾î¼­ ¾Æ·¡ ºÎºÐ¿¡ Ãß°¡ÇÒ µµ¸ÞÀÎ°ú ±×¿¡ µû¸¥ ºÎ°¡ÀûÀÎ Á¤º¸¸¦ ÀÔ·ÂÇÕ´Ï´Ù.
		<¼Ò½º ÆÄÀÏ¸í="¼³Ä¡°æ·Î">
<![CDATA[...
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
NameVirtualHost *

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
    <VirtualHost *>
    ServerName kpanet.or.kr
    DocumentRoot /home/jakarta/kpanet402/webapps/ROOT
    ServerAlias kpanet.or.kr *.kpanet.or.kr
    </VirtualHost>

    <VirtualHost *>
    ServerName ycpa.or.kr
    DocumentRoot /home/vhost/ycpahome/ROOT
    ServerAlias ycpa.or.kr *.ycpa.or.kr
    </VirtualHost>

    <VirtualHost *>
    ServerName pharmsnet.com
    DocumentRoot /home/jakarta/pmstemp
    ServerAlias pharmsnet.com *.pharmsnet.com
    </VirtualHost>

Include /home/jakarta/kpanet402/conf/jk/mod_jk.conf
]]>        </¼Ò½º>
		</text>
	</what>

	<what>
		<text>
		Á¦°¡ »ç¿ëÇÏ´Â httpd.conf ÆÄÀÏÀÇ ÀÏºÎÀÔ´Ï´Ù. httpd.conf ÀÇ ¸¶Áö¸· ºÎºÐ¿¡ °¡»óÈ£½ºÆ® ¼½¼ÇÀÌ ÀÖ°í, ÀÌ ºÎºÐ¿¡ ¿©·¯°³ÀÇ µµ¸ÞÀÎÀ» ¼¼ÆÃÇÏ¸é µË´Ï´Ù. À§ÀÇ ¿¹¿¡¼­´Â kpanet.or.kr, ycpa.or.kr, pharmsnet.com ÀÌ·¸°Ô 3°³ÀÇ µµ¸ÞÀÎÀÌ ¼³Á¤µÇ¾îÀÖ½À´Ï´Ù. °¢°¢ÀÇ µµ¸ÞÀÎ¸¶´Ù ROOT µð·ºÅä¸®°¡ ´Ù¸£°Ô ¼³Á¤µÇ¾îÀÖ½À´Ï´Ù. °¢°¢ÀÇ ÅÂ±× ¾È¿¡ ÀÖ´Â DocumentRoot ÀÇ °ªÀÌ ´Ù¸§À» È®ÀÎÇÏ½Ç ¼ö ÀÖÀ» °Ì´Ï´Ù. ±×¸®°í ServerAlias ´Â 2Â÷ µµ¸ÞÀÎÀ» Æ÷ÇÔÇÕ´Ï´Ù. ´ëÇ¥ÀûÀÎ °ÍÀÌ www.kpanet.or.kr ¿¡¼­ÀÇ www °¡ µÇ°ÚÁÒ. ¸ðµç °ÍÀ» ÅëÆ²¾î wildcard ¹®ÀÚÀÎ * À¸·Î Ã³¸®ÇÏµµ·Ï ÇÕ´Ï´Ù. 2Â÷ µµ¸ÞÀÎ¸¶´Ù ´Ù¸£°Ô µð·ºÅä¸®¸¦ ÁöÁ¤ÇÏ´Â ¹ýÀº ¼³¸íÇÏÁö ¾Ê°Ú½À´Ï´Ù. ÀÌ¿¡ °üÇÑ ¹®¼­´Â ¾Æ·¡ ¸µÅ©¿¡¼­ ¼Ò°³ÇÑ »çÀÌÆ®¸¦ Ã£¾Æº¸½Ã´Â °ÍÀÌ ´õ ³ªÀ» °ÍÀÌ¶ó »ý°¢µË´Ï´Ù.
		</text>
	</what>

	<what>
		<text>
		¸¶Áö¸·ÁÙÀÇ Include ´Â tomcat°ú ¿¬µ¿ÇÏ´Â ¸ðµâÀÎ mod_jk.conf ÆÄÀÏÀÇ °æ·Î¸¦ Àû¾î³õÀº °ÍÀÔ´Ï´Ù. apache¸¸À¸·Î ¼­ºñ½ºÇÒ °æ¿ì¿¡´Â ÇÊ¿ä¾ø½À´Ï´Ù. ÀÏ´Ü ÀÌ·¸°Ô °¡»óÈ£½ºÆ® ¼³Á¤À» ¸¶ÃÆÀ¸¸é /usr/local/apache/bin/apachectl restart ·Î Àç½Ãµ¿ÇÕ´Ï´Ù.
		</text>
	</what>

	<what>
		<text>
		ºê¶ó¿ìÀú¸¦ ¿­¾î¼­ ¼³Á¤À» È®ÀÎÇØº¸½Ã±â ¹Ù¶ø´Ï´Ù. ¾Æ·¡ÀÇ ¸µÅ©¿¡¼­ ´õ ÀÚ¼¼ÇÑ Á¤º¸¸¦ Ã£¾Æº¸½Ã±â ¹Ù¶ø´Ï´Ù.
		</text>
	</what>

	<refer>
		<link>http://www.apache.org/docs/vhosts/</link>
		<comment>¾ÆÆÄÄ¡ °¡»óÈ£½ºÆ® ¼³Á¤¿¡ ´ëÇÑ °ø½Ä¹®¼­</comment>
	</refer>
	<refer>
		<link>http://www.apache.kr.net/documents/vhost-story.html</link>
		<comment>Á¤°üÁø´ÔÀÇ ¾ÆÆÄÄ¡ °¡»óÈ£½ºÆ® ¼³Á¤¿¡ ´ëÇÑ ÇÑ±Û¹®¼­</comment>
	</refer>
	<refer>
		<link>http://www.superuser.co.kr/apache/virtualhost/page01.htm</link>
		<comment>¾ÆÆÄÄ¡¸¦ È°¿ëÇÑ °¡»óÈ£½ºÆ® ¼³Á¤¹ý</comment>
	</refer>
	<refer>
		<link>http://www.0u4u.com/linux/apache8.htm</link>
		<comment>°øÀ¯Æ÷À¯ÀÇ °¡»óÈ£½ºÆ® ¼³Á¤¹ý</comment>
	</refer>
	<refer>
		<link>http://www.apache.kr.net</link>
		<comment>ÇÑ±¹ ¾ÆÆÄÄ¡ À¯Àú ±×·ì</comment>
	</refer>
	<refer>
		<link>http://okjsp.pe.kr/lecture/lec01/vhost02.xml</link>
		<comment>Tomcat4ÀÇ °¡»óÈ£½ºÆ® ¼³Á¤</comment>
	</refer>
</lecture>
