°¡»óÀ¥-¹Ì´Ï-ÇÏ¿ìÅõ Dan Pancamo, pancamo@infocom.net http://www.infocom.net/~pancamo/ v1.0, 24 November 1995 Copyright 1995 ÀÌ ¹®¼­´Â ¸®´ª½ºÇÏ¿¡ °¡»ó À¥ ½ÎÀÌÆ® ¼³Á¤ÀÇ Çʼö¿ä¼ö¸¦ ±â¼úÇÑ°ÍÀÌ´Ù. ¸ñÂ÷ 1.0 °¡»ó À¥ ½ÎÀÌÆ®¶õ ¹«¾ùÀΰ¡? 2.0 ¾î¶² ÆÐÄ¡ ¼ÒÇÁÆ®¿þ¾î°¡ ÇÊ¿äÇÑ°¡? 2.1 ¸®´ª½º ¹öÀü 1.2.X¿¡¼± the IPalias patch alias-patch-1.2.1-v1°¡ ÇÊ¿äÇÏ´Ù. 2.2 NCSA 1.5¿Í Apache¿¡¼± °¡»ó È£½ºÆÃÀÌ Áö¿øµÈ´Ù. 3.0 ¹«¾ùÀ» ¼³Á¤ÇؾßÇϳª? 3.1 »õ·Î¿î °èÁ¤ ¸¸µé±â 3.2 NCSA 1.5¿Í ApacheÀÇ config ÆÄÀÏ ¼³Á¤ 3.3 ÀÎÅÍÆäÀ̽º ¼³Á¤ 3.4 ÀÎÅÍ´Ð µî·Ï 3.5 Named ¼³Á¤ 3.5.1 ¿¹Á¦ /etc/named.boot (x¸¦ ÀÚ½ÅÀÇ IP·Î ±³Ã¼) 3.5.2 ¿¹Á¦ /etc/named.data/db.domain1.com 3.5.3 ¿¹Á¦ /etc/named.data/db.xxx.xxx.xxx 3.5.4 named Àç½ÇÇà; i.e. named.restart 3.6 °¡»ó ¸ÞÀÏ 3.6.1 ¼¾µå¸ÞÀÏ ¼³Á¤ 3.6.1.1 /etc/domainalias ÀÛ¼ºÇϱâ 3.6.1.2 the maped DB ÆÄÀÏ ÀÛ¼ºÇϱâ 3.6.1.3.1 È£½ºÆ®º° Cw ·¹ÄÚµå Ãß°¡Çϱâ 3.6.1.3.2 the domainalias mapping Ãß°¡Çϱâ 3.6.1.3.3 Ruleset 98 Ãß°¡¹× º¯°æ 3.7 °¡»ó FTP 4.0 °¡»ó À¥ Á¤º¸¿¡ ´ëÇÑ ¸µÅ© 1.0 °¡»ó À¥ ½ÎÀÌÆ®¶õ ¹«¾ùÀΰ¡? ¿ùµå ¿ÍÀ̵å À¥ (WWW) ¼­¹ö´Â ÀϹÝÀûÀ¸·Î ÇϳªÀÇ ÄÄÇ»ÅÍ´Â ÇϳªÀÇ À¥ »çÀÌÆ®¿¡ ´ëÇÑ HTTPD ¿äûÀ» ¼öÇàÇÑ´Ù. °£´ÜÈ÷, ÄÄÇ»ÅÍ´ç ÇϳªÀÇ WWW ½ÎÀÌÆ®°¡ ¼³Á¤µÈ´Ù. ¸¹Àº WWW »çÀÌÆ®µéÀº httpdÀÇ ¿ä±¸·Î ÁøÇàµÇ´Â ÄÄÇ»ÅÍ ÀÚ¿ø È°¿ë½Ã°£ ÀÌ ÀûÀ¸¸ç, ´ëºÎºÐÀÇ ÄÄÇ»ÅÍ ÀÚ¿øµéÀº »ç¿ëµÇÁö ¾ÊÀºÃ¼ ³²°ÔµÈ´Ù. °¡»ó À¥ ½ÎÀÌÆ®´Â ÇϳªÀÌ»óÀÇ À¥ ½ÎÀÌÆ®°¡ ÇÑ°³ÀÇ ÇÁ·Î¼¼½º¸¦ ½±°Ô °øÀ¯ÇÏ°Ô ÇÑ´Ù. www.domain1.com°ú www.domain2.com´Â µÎ°³ÀÇ ¹°¸®Àû ÄÄÇ»ÅÍ µð¹ÙÀ̽º¸¦ ¿ä±¸ ÇÏÁö ¾Ê°í, ÇϳªÀÇ µð¹ÙÀ̽º¿¡ À§Ä¡ÇÏ¿© °øÅëÀÚ¿øÀ» °øÀ¯ÇÒ¼ö ÀÖ´Ù. ÀϹÝÀûÀ¸·Î ¼Ò±Ô¸ðÀÇ ÄÄÇ»ÅÍ ½Ã¼³À̳ª, ȸ»ç¿¡¼± Àü¿ë À¥¼­¹ö ¹× ÀÎÅÍ³Ý ¿¬°á À» ±¸ºñÇÏÁö ¾Ê¾Æµµ µÈ´Ù. ºñ¿ëÀÇ °æ¿ì $10000 Á¤µµ·Î ½±°Ô ½ÃÀÛÇÒ¼ö ÀÖÀ¸¸ç, ÇÑ´Þ¿¡ $500-2500Á¤µµ ¼Ò¿äµÈ´Ù. ¼Ò±Ô¸ðÀÇ ÄÄÇ»ÅÍ ½Ã¼³ÀÏ°æ¿ì °¡»ó À¥ °ø±ÞÀÚ·Î ºÎÅÍ ¹Ù·Î "ÀÓ´ë"°¡ °¡´ÉÇÏ´Ù. °í°´Àº telnetÀ̳ª FTP ¿¬°áÀ» ÀÌ¿ëÇÏ¿© À¥ ÆäÀÌÁö¸¦ º¸À¯ÇÒ¼ö ÀÖ´Ù. InfoCom Networks http://www.infocom.net/¿Í °°Àº À¥ °ø±ÞÀÚ·Î ºÎÅÍ ¿ù $75 ¿Í °°Àº Àú·ÅÇÑ °¡°ÝÀ¸·Î À¥ ½ºÆäÀ̽º¸¦ °ø±Þ¹ÞÀ»¼ö ÀÖ´Ù. ¸î¸î °¡»ó ½ÎÀÌÆ®´Â ¾Ö¸Þ¸ðÈ£ÇÑÁ¡ÀÌ ÇØ°á µÇ¾úÀ»Áöµµ ¸ð¸¥´Ù. ±×·¡¼­ °¡»ó À¥ ½ÎÀÌÆ® ¼³Á¤¿¡ µå´Â ºñ¿ëÀº Àü¿ë ¼­¹ö³ª ÀÎÅÍ³Ý ¿¬°áº¸´Ù º¸´Ù µÎ¸£·¯Áö°Ô ½Î´Ù. °¡»ó À¥½ÎÀÌÆ®´Â "www.yourprovider.com/~businessname"°ú °°Àº À¥ ÁÖ¼Ò ÇÒ´ç ¼³°è¿¡¼­ Å« ÀÕÁ¡ À» °¡Áø´Ù. º»ÁúÀûÀ¸·Î °¡»ó À¥ ¼­¹ö´Â ÁÖ¼Ò º¯°æ¾øÀÌ Àü¿ë À¥¼­¹öÀÇ ¼³Á¤À̳ª »õ À§Ä¡¼³Á¤ÀÇ ´É·ÂÀ» ³»Æ÷ÇÏ°í ÀÖ´Ù. À¥ÀÇ URLÀÇ º¯°æÀº ´ç½ÅÀÇ ½ÎÀÌÆ® Á¢¼Ó ºóµµ¿Í ¸¹Àº »ç¾÷»óÀÇ ¹®¼­ÀÇ °»½Å¿¡¼­ ¸·´ëÇÑ ¼Õ½ÇÀ» ÃÊ·¡ÇÑ´Ù. ´ëºÎºÐÀÇ À¥»çÀÌÆ®µé´Â www.domain1.com°ú www.domain2.com°¡ IP·Î ³ª´©¾îÁ® ÀÖ´Ù. ½Ì±Û È£½ºÆ®·ÎºÎÅÍ ´ÙÁß ¿äûÀ» ¼ö¿ëÇϱâ À§Çؼ­´Â, °¡»ó È£½ºÆ®´Â ¾çÂÊ ½ÎÀÌÆ®¿¡ ´ëÇÑ ¿äû¿¡ ´äÇÒ ¼ö ÀÖ¾î¾ßÇÑ´Ù. ÀÌ·± ¹®Á¦ÀÇ ÇØ°áÃ¥À¸·Î IP aliasingÀ̶õ ¹æ¹ýÀÌ ÀÖ´Ù. IP aliasingÀº ½Ì±ÛÈ£½ºÆ®°¡ ´ÙÁß IP¿¡ ´ëÇÑ ¿äûÀ» °¡´ÉÇÏ°Ô ÇÑ´Ù. °¡»ó À¥¼­¹ö´Â alias IP ´É·ÂÀ» °®Ãß¾î¾ßÇÑ´Ù. IP aliasingÀº ´ÜÁö °¡»ó ¼Ö·ç¼ÇÀÇ ÇÑ ºÎºÐÀÏ »ÓÀÌ´Ù. µµ¸ÅÀÎ ³×ÀÓ ½Ã½ºÅÛ (DNS) ¶ÇÇÑ www.domain1.com°ú www.domain2.comÀ¸·Î ³ª´©¾î ¼³Á¤µÇ¾î¾ß ÇÑ´Ù. ¸¸¾à domain1.com°ú domain2.comÀÌ »õ·Î¿î µµ¸ÞÀÎÀ̶ó¸é, µÑ´Ù Internic¿¡ µî ·ÏµÇ¾î ÀÖ¾î¾ß ÇÑ´Ù. ÇöÀç Internic¿¡ ´ç½ÅÀÇ µµ¸ÞÀÎÀ» µî·ÏÇϴµ¥ ¿¬ $50°¡ ¼Ò¿ä µÈ´Ù. ´ëºÎºÐÀÇ °¡»ó À¥»çÀÌÆ®µéÀº °¡»ó ¸ÞÀÏÀ̳ª, ¸ðµç ¸ÞÀÏÀ» °¡»ó µµ¸ÞÀÎÀÇ ´Ù¸¥ À¯Àú³ª À¯Àúµé¿¡°Ô Àü¼ÛÇÏ´Â ´É·ÂÀ» °¡Áö°í ÀÖ´Ù. ¶ÇÇÑ °¡»ó FTP³ª "ftp.domain1.com"°ú °°Àº Ç¥ÁØ È£½ºÆ® ³×ÀÓÀ» »ç¿ëÇÏ´Â FTP ´É·ÂÀÌ À¥ °ø±ÞÀڷκÎÅÍ Çü¼ºµÇ¾î Áú¼öÀÖ´Ù. 2.0 ¾î¶² ÆÐÄ¡ ¼ÒÇÁÆ®¿þ¾î°¡ ÇÊ¿äÇÑ°¡? 2.1 ¸®´ª½º ¹öÀü 1.2.x´Â the IPalias patch alias-patch-1.2.1-v1°ú alias-net-tools.tar°¡ ¿ä±¸µÈ´Ù. ¾ÆÁ÷±îÁø 1.3.X¿¡¼­ Áö¿øÇÏ´ÂÁö´Â È®½Å ÇÒ¼ö ¾ø´Ù. ftp://ftp.mindspring.com/users/rsanders/ipalias/¿¡¼­ the IPalias patch¿¡°üÇÑ ´õ ¸¹Àº Á¤º¸¸¦ ¾òÀ»¼ö ÀÖ´Ù. IP alias ¼Ö·ç¼Ç ´ë¿ëÀ¸·Î ¸ÖƼÇà ´õ¹Ì ÀÎÅÍÆäÀ̽º »ç¿ëÀÌ Á¦¾È µÇ¾î ¿Ô¾ú ´Ù. ´õ¹Ì ¼Ö·ç¼ÇÀ¸·Î »ç¿ëÇÏ´Â µ¿¾ÈÀº IP alias ¼Ö·ç¼Çº¸´Ù È®¿¬ÇÏ°Ô ³ªÅ¸ ³ªÁö ¾Ê´Â´Ù. ¾ÆÆÄÄ¡³ª ´õ¹Ì ¼Ö·ç¼Ç »ç¿ë¿¡ ´õ ¸¹Àº Á¤º¸¸¦ ¾òÀ¸·Á¸é, http://www.qosina.com/apache/virtual.html¿¡ ÀÖ´Â Aram MirzadehÀÇ °¡»ó È£½ºÆà ÀÎÆ÷¸ÞÀ̼ÇÀ» ÂüÁ¶Çϼ¼¿ä. IPalias¸¦ ÀÌ¿ëÇÏ¿© »õ·Î¿î alias¸¦ Ãß°¡ÇÏ´Â ¹æ¹ýÀº ´ÙÀ½°ú °°´Ù. : > /sbin/ifconfig eth0 alias www.domainX.com ¶ÇÇÑ, IPalias ¼Ö·ç¼ÇÀº ´Ù¸¥ ´Ù¾çÇÑ Ç÷¿Æû¿¡¼­µµ Áö¿øµÈ´Ù. 2.2 NCSA 1.5, Apache, Spinner¿¡¼­µµ °¡»ó È£½ºÆÃÀ» Áö¿øÇÑ´Ù. http://hoohoo.ncsa.uiuc.edu/docs/Overview.html http://www.apache.org/ http://spinner.infovav.se/ 3.0 ¹«¾ùÀ» ¼³Á¤ÇؾßÇϳª? 3.1 »õ·Î¿î °èÁ¤ ¸¸µé±â °¡»ó °í°´ÀÇ È¨ µð·ºÅ丮¿Í ¸ÞÀÏÀ» ÀϹÝÀû ¸®´ª½º °èÁ¤À¸·Î ¸¸µç´Ù. 3.2 NCSA 1.5¿Í ApacheÀÇ config ÆÄÀÏ ¼³Á¤ °¡»ó È£½ºÆ®¹ýÀº °è¼Ó º¯ÇÏ°í ÀÖ´Ù. Virtual Host Check the server's release notes¸¦ ´õ »ó¼¼È÷ Áö¿øÇÏ´Â ¾à°£ÀÇ ÆÐÄ¡µµ Á¸ÀçÇÑ´Ù. NCSA 1.5¿Í Apache´Â ÇöÀç °¡»ó ÆÐÄ¡¸¦ Æ÷ÇԵǾî ÀÖÀ¸¸ç, Spinner´Â °¡»ó È£½ºÆ®¸¦ Áö ¿øÇÑ´Ù°í ¸»ÇÑÀû ÀÖ´Ù. ¾ÆÆÄÄ¡ °¡»ó ÆÐÄ¡´Â srm.confÀÇ syntax¿¡ µû¶ó Áö¿ø °í, NCSA 1.5´Â °¡»ó È£½º´Â Á¤ÀÇ ¹æ¹ý¿¡ µû¶ó ¸Å¿ì À¯¿¬ÀûÀ¸·Î Áö¿øµÈ´Ù. SubDocumentRoot www.domain1.com /usr/local/etc/httpd/docs/domain1 SubDocumentRoot www.domain2.com /usr/local/etc/httpd/docs/domain2 NCSA¿Í ¾ÆÆÄÄ¡´Â httpd.conf¿¡ ¾Æ·¡ÀÇ ¹®ÀåÀ» ±âÀÔÇؾßÇÑ´Ù. : ServerAdmin webmaster@domain1.com DocumentRoot /usr/local/etc/httpda/docs/domain1 ServerName www.domain1.com ErrorLog logs/errors.domain1.com TransferLog logs/access_log.domain1.com 3.3 ÀÎÅÍÆäÀ̽º ¼³Á¤ ¾Õ¿¡¼­ ´ç½ÅÀÇ ·ÎÄ® À¥ ¼­¹öÀÇ /etc/rc.d/rc.local¿¡ ¾Æ·¡¿Í °°ÀÌ IPalias ÆÐÄ¡°¡ Ãß°¡ ¼³Ä¡ µÇ¾úÀ» °ÍÀÌ´Ù. /sbin/ifconfig eth0 alias www.domain1.com /sbin/ifconfig eth0 alias www.domain2.com /sbin/ifconfig eth0 alias www.domainN.com 3.4 ÀÎÅÍ´Ð µî·Ï ¸¸¾à »õ·Î¿î µµ¸ÞÀÎÀÇ ¼³Á¤À̳ª, ÇöÀç µµ¸ÞÀÎÀÇ º¯°æÀ» ¸¶ÃÆ´Ù¸é, µµ¸ÞÀÎ À» Internic¿¡ µî·ÏÇØ¾ß ÇÑ´Ù. ÅÛÇø´Àº ftp://rs.internic.net/templates/domain-template.txt¿¡¼­ ¹ß°ßÇÒ¼ö ÀÖ´Ù. 3.5 Named ¼³Á¤ Named´Â ´ç½ÅÀÇ °¡»ó µµ¸ÞÀÎÀ» ¿ÜºÎ¿¡¼­ ½Äº°°¡´ÉÇÏ°Ô ¼³Á¤ µÇ¾îÁ®¾ß ÇÑ´Ù. ³ª´Â DNS¿¡ °üÇØ Àü¹®°¡°¡ µÇ¶ó°í´Â ÁÖÀåÇÏÁö ¾Ê´Â´Ù. Á¦¾È¿¡ ´ëÇؼ± Ç×»ó ȯ¿µÇÕ´Ï´Ù. 3.5.1 ¿¹Á¦ /etc/named.boot (x¸¦ ´ç½ÅÀÇ IP·Î ¹Ù²Û´Ù) directory /etc/named.data primary realdomain.com db.realdomain.co m primary xxx.xxx.xxx.IN-ADDR.ARPA db.xxx.xxx.xxx primary 0.0.127.IN-ADDR.ARPA db.local primary domain1.com db.domain1.com primary domain2.com db.domain2.com cache . named.root 3.5.2 ¿¹Á¦ /etc/named.data/db.domain1.com $ORIGIN com. domain1 IN SOA domain1.com. hostmaster.domain1.com. ( 10134 43200 3600 604800 86400 ) IN NS ns1.realdomain.com. IN MX 10 mail.realdomain.com. IN MX 0 domain1.com. domain1.com. IN A xxx.xxx.xxx.xxx ;www.domain1.com IP $ORIGIN domain1.com. ftp IN CNAME domain1.com. www IN CNAME domain1.com. mail IN CNAME domain1.com. 3.5.3 ¿¹Á¦ /etc/named.data/db.xxx.xxx.xxx ´ç½ÅÀº db.xxx.xxx.xxx¿¡ ´ç½ÅÀÇ ÇöÀç ½ÎÀÌÆ®¸¦ »õ·Î¿î °¡»ó µµ¸ÞÀο¡ ´ëÇÑ ¿ª ÃßÀûÀ» Æ÷ÇÔÇؼ­ °»½Å ÇؾßÇÑ´Ù. xx IN PTR www.domain1.com. xx IN PTR www.domain2.com. 3.5.4 named Àç½ÇÇà; i.e. named.restart 3.6 °¡»ó ¸ÞÀÏ ´ç½ÅÀÇ °¡»ó °í°´Àº ÀÚ½ÅÀÇ µµ¸ÞÀÎÀ¸·Î º¸³»°í, ´Ù¸¥ µµ¸ÞÀÎÀ¸·Î Àü¼ÛµÇ¾îÁö ´Â ´É·ÂÀ» ´õ ¿øÇÏ°Ô µÈ´Ù. sendmail.cfÀÇ ¾à°£ÀÇ º¯È­·Î °¡´ÉÇÏ´Ù. ¸î´Þ¿¡ °ÉÃÄ ´Ù¾çÇÏ°Ô sandmailÀ» º¯°æÇØ º» °á°ú ÃÖ°íÀÇ ¹æ¹ýÀº °¢°¢ÀÇ »õ·Î¿î °¡»ó ½ÎÀÌÆ®¸¶´Ù sandmail.cf¸¦ Çѹø¸¸ º¯°æÁÖ¸é µÈ´Ù´Â°ÍÀ» ¾Ë°Ô µÇ¾ú½À´Ï´Ù. 3.6.1 ¼¾µå¸ÞÀÏ ¼³Á¤ makemap btree¸¦ Áö¿øÇÏ´Â °ÍÀ¸·Î ÇöÀçÀÇ sendmailÀ» ¹Ù²Û´Ù. 3.6.1.1 /etc/domainalias ÀÛ¼ºÇϱâ *@domain1.com localnet@realdomain.com *@domain2.com townplaz@realdomain.com *@domainN.com soracomp@realdomain.net webmaster@domain1.com somuser@anotherhost.com jamison@domain2.com anotheruser@somehost.com 3.6.1.2 the maped DB ÆÄÀÏ ÀÛ¼ºÇϱâ > makemap btree /etc/domainalias.db < /etc/domainalias 3.6.1.3 the maped DB ÆÄÀÏ ÀÛ¼ºÇϱâ 3.6.1.3.1 È£½ºÆ®º° Cw ·¹ÄÚµå Ãß°¡Çϱâ Cwdomain1.com Cwdomain2.com 3.6.1.3.2 the domainalias mapping Ãß°¡Çϱâ Kdomainalias btree /etc/domainalias.db 3.6.1.3.3 Ruleset 98 Ãß°¡¹× º¯°æ ################################################################ ### ### Ruleset 98 -- local part of ruleset zero (can be null) ### ################################################################ ### S98 R$+ < $+ . > $1 < $2 > remove t railing dots R$+ < $+ > $: < > $(domainalias $1$2 $) match us er@address R< > $+ @ $* $: < $1 > $(domainalias * @ $2 $) match *@ address R< $+ > * $* $: < > $1 $2 replace * with userid R < $+ > $+ $: < > $2 bugfix R< > $* $: $>3 $1 and rewr ite using S3 3.5.1.4 Sendmail Å×½ºÆ® sendmail ¼³Á¤ Å×½ºÆ®·Î »õ·Î¿î sendmail.cf º¯È­¸¦ °ËÁõÇÑ´Ù. > sendmail -v -bv info@domain1.com ÃÖÁ¾ ¸ñÀûÁö°¡ ³ªÅ¸³¯°ÍÀÌ´Ù. 3.7 °¡»ó FTP ÇöÀç±îÁö ³ª´Â ¾ÆÁ÷ »ç¿ëÇÒ¸¸ÇÑ °¡»ó FTP¸¦ ±¸ÇÏÁö ¸øÇß´Ù. ¸î¸îÀÇ ÆÐÄ¡°¡ Á¸ÀçÇϸç, ÆÐÄ¡ ÀÛ¾÷ÁßÀ̶ó°í ¾Ë°í ÀÖ´Ù. ÀüÁ¤ÇÑ °¡»ó FTP°¡ ¾Æ´Ñ ´ÜÁö /home/ftp/business/domain1°ú °°Àº µð·ºÅ丮¸¸ ¸¸µç´Ù. (wu-ftp ·Î °¡»ó ftp °¡ °¡´ÉÇÒ°ÍÀÌ´Ù. ±×¿¡ ´ëÇÑ ¹Ì´Ï ÇÏ¿ìÅõµµ ÀÖ´Ù.) ¸¸¾à ´©±º°¡ ¼Ö·ç¼ÇÀ» Á¦°øÇÏ°íÀÚ ÇÑ´Ù¸é, ¿©±â¿¡ Ãß°¡ÇÒ °ÍÀÌ¸ç ´õÇÒ³ªÀ§ ¾øÀÌ ±â»Ü°ÍÀÌ´Ù. Arnt Gulbrandsen´Â µ¶¸³ÀûÀÎ FTP ¼­ºñ½º¸¦ Á¦°øÇÏ´Â The Troll Tech FTP DaemonÀ» Æ÷ÇÔÇÑ ftpd¸¦ ´Ù½Ã ½á³Â´Ù. 4.0 °¡»ó À¥ Á¤º¸¿¡ ´ëÇÑ ¸µÅ© http://hoohoo.ncsa.uiuc.edu/docs/Overview.html http://www.apache.org/ http://www.qosina.com/apache/virtual.html http://spinner.infovav.se/ ftp://ftp.mindspring.com/users/rsanders/ipalias/ http://www.thesphere.com/~dlp/TwoServers/ http://hoohoo.ncsa.uiuc.edu/docs/setup/httpd/VirtualHost.html ftp://ftp.dhp.com:/pub/linux/virtual-hosting