Home Map Index Search News Archives Links About LF
[Top bar]
[Bottom bar]
[Photo of the Author]
by Atif Ghaffar

ÀúÀÚ¿¡´ëÇØ:

ÀúÀÚ´Â ½ºÀ§½º¿¡¼­ À¥¸¶½ºÅÍ¿Í À¯´Ð½º °ü¸®ÀÚ·Î ÀÏÇÏ°í ÀÖ´Ù. ÀúÀÚ´Â Linux, unix, Perl, Apache¿Í GPL s/wµî¿¡ °ü½ÉÀ» °¡Áö°í ÀÖ´Ù. ÀúÀÚ¿¡ ´ëÇÑ ´õ ÀÚ¼¼ÇÑ °ÍÀº ÀúÀÚÀÇ È¨ÆäÀÌÁö¿¡¼­ ¹ß°ßÇÒ ¼ö ÀÖ´Ù.

Â÷·Ê:

¾ÆÆÄÄ¡¸¦ »ç¿ëÇÑ IP ÁÖ¼Ò Àç»ç¿ë

[Illustration]

Abstract:

ÀÌ ¹®¼­´Â Unix¿Í Linux»ó¿¡¼­ ¾ÆÆÄÄ¡¸¦ »ç¿ëÇÏ¿© °°Àº IP ÁÖ¼Ò¸¦ »ç¿ëÇÏ´Â ¿©·¯°³ÀÇ ¹öÃß¾ó À¥¼­¹ö¸¦ ¿î¿µÇÏ´Â ¹ýÀ» º¸ÀδÙ. ÀÌ ¹®¼­´Â µ¶ÀÚ°¡ ¾ÆÆÄÄ¡¿Í DNS ±×¸®°í Unix¿¡ ´ëÇØ ±âº»ÀûÀÎ Áö½ÄÀ» °¡Áö°í ÀÖ´Ù°í °¡Á¤ÇÑ´Ù. ÀÌ ¹®¼­ÀÇ ÁÖ µ¶ÀÚ´Â ISP¿Í ½Ã½ºÅÛ °ü¸®ÀÚ ±×¸®°í ¹è¿ì±â¸¦ ¿øÇÏ´Â ¸ðµç »ç¶÷µéÀÌ´Ù.



 

¿Ö IP ÁÖ¼Ò¸¦ Àç »ç¿ëÇÏ¿©¾ß Çϴ°¡?

IP ÁÖ¼Ò¸¦ Àç»ç¿ë ÇÏ´Â °ÍÀº ¿©·¯°¡Áö ÀÌÀ¯¿¡¼­ À¯¿ëÇÏ´Ù.

  1. IP ÁÖ¼ÒÀÇ °í°¥À» ½±°Ô ¹æÁö ÇÒ ¼ö ÀÖ´Ù.
  2. ÇϳªÀÇ IP ÁÖ¼Ò¸¸À» °¡Áö°í ÀÖÀ¸¸é µÈ´Ù. (ÇÊÀÚÀÇ °æ¿ì!)
  3. ¿©·¯°³ÀÇ IP ÁÖ¼Ò¸¦ »ç¿ëÇϱâ À§ÇØ È£½ºÆ®¿¡ ÀÎÅÍÆäÀ̽º¸¦ µ¡ºÙÀÌ´Â °ÍÀº ´õ ¸¹Àº °ü¸® ½Ã°£ÀÌ µç´Ù.
 

¾î¶»°Ô IP ÁÖ¼Ò¸¦ Àç »ç¿ëÇϴ°¡?

¾ÆÆÄÄ¡¸¦ »ç¿ëÇÏ¿© ÇϳªÀÇ IP ÁÖ¼Ò·Î ¿©·¯°³ÀÇ µµ¸ÞÀÏÀ» °ü¸®ÇÏ´Â °ÍÀº °£´ÜÇÏ´Ù.
ÀÌ ¹®¼­´Â 192.168.1.1ÀÇ IP ÁÖ¼Ò¸¦ »ç¿ëÇÑ´Ù°í °¡Á¤ÇÏ°í µµ¸ÞÀÎ À̸§Àº hometranet.home À» »ç¿ëÇÑ´Ù°í °¡Á¤ÇÑ´Ù.
¾Æ·¡ ¶óÀÎÀ» ´ç½ÅÀÇ httpd.conf ÆÄÀÏ¿¡ °£´ÜÈ÷ Áý¾î ³Ö´Â´Ù.
NameVirtualHost 192.168.1.1:80
´ÙÀ½Àº °°Àº IP ÁÖ¼Ò¸¦ »ç¿ëÇÏ¿© 3°³ÀÇ ¹öÃß¾ó ¼­¹ö¸¦ Ãß°¡ÇÒ °ÍÀÌ´Ù.
#Host for unix files <VirtualHost 192.168.1.1:80> ServerName unix.hometranet.home DocumentRoot /www/unix/html ScriptAlias /cgi-bin/ /www/unix/cgi-bin/ TransferLog /www/unix/logs/access_log ErrorLog /www/unix/logs/error_log </VirtualHost> #Host for perl stuff <VirtualHost 192.168.1.1:80> ServerName perl.hometranet.home DocumentRoot /www/perl/html ScriptAlias /cgi-bin/ /www/perl/cgi-bin/ TransferLog /www/perl/logs/access_log ErrorLog /www/perl/logs/error_log </VirtualHost> #Here we host some cool Apache stuff <VirtualHost 192.168.1.1:80> ServerName apache.hometranet.home DocumentRoot /www/apache/html ScriptAlias /cgi-bin/ /www/apache/cgi-bin/ TransferLog /www/apache/logs/access_log ErrorLog /www/apache/logs/error_log </VirtualHost> À§¿Í °°ÀÌ Ãß°¡Çϸé ÇϳªÀÇ IPÁÖ¼Ò·Î ½±°Ô 3°³ÀÇ ¹öÃß¾ó È£½ºÆ®¸¦ µ¡ ºÙÀÏ ¼ö ÀÖ´Ù.

´ÙÀ½Àº ´ç½ÅÀÇ ³×ÀÓ¼­¹öÀÇ zone ÆÄÀϾȿ¡ ÀÌ·¯ÇÑ À̸§ÀÇ ·¹Äڵ峪 CNAMESÀ» Ãß°¡ÇÑ´Ù.
±×¸®°í ½Ã¸®¾ó ³Ñ¹ö¸¦ Ãß°¡ÇÏ´Â °ÍÀ» ÀØÁö ¸»±â¸¦.. :)
¿¹: ³ªÀÇ /var/named/hometranet.home.fwd ÆÄÀÏ¿¡ ´ÙÀ½À» Ãß°¡ÇÏ¿´´Ù.
perl.hometranet.home. IN A 192.168.1.1 apache.hometranet.home. IN A 192.168.1.1 unix.hometranet.home. IN A 192.168.1.1
Áß¿ä!!: ¸¸¾à ´ç½ÅÀÌ ¹öÃß¾ó ¼³Á¤(virtual config)¾È¿¡ ÁÖ¾îÁø °Í ¸»°í ´Ù¸¥ À̸§À¸·Î ÀÌ È£½ºÆ®¸¦ ºÎ¸£¸é ù¹ø° ¹öÃß¾ó È£½ºÆ®°¡ ¹ÝÀÀ ÇÒ °ÍÀÌ´Ù.
¾ÆÆÄÄ¡ 1.3.x ÀÌÀü ¹öÀüÀº ¸¶Áö¸· È£½ºÆ®°¡ ¹ÝÀÀÇÑ´Ù.
¿¹ : È£½ºÆ®°¡ madmagÀ¸·Î À̸§Áö¿öÁö¸é http://madmag.hometranet.homeÀÌ ºÒ¸°ÅÙµ¥, ÀÌ°ÍÀº ´ç½ÅÀÌ unix.hometranet.homeÀ» È£ÃâÇÏ´Â °Í°° °°Àº °á°ú¸¦ °¡Á®¿Â´Ù.
 

¿ÍÀϵåÄ«µå »ç¿ë°ú µ¿Àû È£½ºÆ® ³×ÀÓ

ÀÌ°ÍÀº »õ·Î¿î ±â´ÉÀÌ´Ù. ¾ÆÆÄÄ¡´Â È£½ºÆ® À̸§¿¡ ¿ÍÀϵåÄ«µå¸¦ »ç¿ëÇÏ´Â °ÍÀ» Çã¿ëÇÑ´Ù.
ÀÌ°ÍÀº ´ç½ÅÀÌ µµ¸ÞÀÎÀ» *.home.hometranet.home°ú °°ÀÌ ¼³Á¤ÇÒ ¼ö ÀÖ´Ù´Â °ÍÀ» ÀǹÌÇÑ´Ù. ±×¸®°í user1.home.hometranet.home, user2.home.hometranet.home, user3.home.hometranet.homeµîµî¿¡ ´ëÇÑ ¸ðµç ÁúÀÇ´Â ÀÀ´äµÉ ¼ö ÀÖ°Ô µÈ´Ù.
¿¹:

#host for users <VirtualHost 192.168.1.1:80> ServerName home.hometranet.home ServerAlias *.home.hometranet.home DocumentRoot /www/home/html TransferLog /www/home/logs/access_log ErrorLog /www/home/logs/error_log </VirtualHost> ±×¸®°í zone ÆÄÀÏ ¾È¿¡¼­ÀÇ Ç׸ñ. *.home.hometranet.home. IN A 192.168.1.1 ÁÖÀÇ : ÀÌ·¯ÇÑ Æ®¸¯Àº ´ç½ÅÀÌ ¸¸¾à ¸¶ÀÌÅ©·Î ¼ÒÇÁÆ®ÀÇ DNS Server¸¦ »ç¿ëÇÑ´Ù¸é ÀÛµ¿µÇÁö ¾Ê´Â´Ù. ¸¶ÀÌÅ©·Î ¼ÒÇÁÆ®ÀÇ DNS Server´Â È£½ºÆ®À̸§¿¡¼­ ¿ÍÀϵåÄ«µå¸¦ »ç¿ëÇϴ°ÍÀ» Çã¿ëÇÏÁö ¾Ê´Â´Ù.
(¼³¸¶ ¿©·¯ºÐÀÌ ±×°É »ç¿ëÇÏ´Â°Ç ¾Æ´Ï°ÚÁÒ??)
³ª´Â µ¥ÀÌÅͺ£À̽º¿¡ »ç¿ëÀÚµéÀÇ °æ·Â»çÇ×À» Ãß°¡Çϱâ À§ÇØ ³×Æ®¿öÅ©»ó¿¡¼­ »ç¿ëÀÚ¸¦ Çã¿ëÇÏ´Â ÀÛÀº ½Ã½ºÅÛÀ» ±¸¼ºÇÑÀûÀÌ ÀÖ½À´Ï´Ù. ±×¶§ À§¿¡¼­ ¸»ÇÑ Æ®¸¯À» »ç¿ëÇߴµ¥, ±×µéÀÇ °æ·Â»çÇ×µéÀº http://theirUserName.cv.developer.ch¿¡¼­ ÇöÀç º¼¼ö ÀÖ½À´Ï´Ù.

 

ÀúÀÇ ¹öÃß¾ó È£½ºÆ® ¼³Á¤ ÆÄÀÏ

ÀÌ°ÍÀº Á»´õ ÀÚ¼¼ÇÑ ¼³Àý ÆÄÀÏÀÔ´Ï´Ù. ÀÌ°ÍÀº ÀúÀÇ ¸ÞÀÎ httpd.conf ÆÄÀÏ¿¡¼­ ÃßÃâÇÑ °ÍÀÔ´Ï´Ù.
ÀÌ°ÍÀº Á¦ ¼­¹ö¿¡¼­ Á¤È®È÷ ÀÛµ¿ÇÕ´Ï´Ù.

ÀÌ ÆÄÀÏÀ» httpd.conf¿¡ Ãß°¡½ÃÅ°±â À§Çؼ­´Â ´ç½ÅÀÇ httpd.conf ÆÄÀϾȿ¡¼­ Include Áö½ÃÀÚ¸¦ »ç¿ëÇÏ¸é µË´Ï´Ù.

Include "/etc/vhosts.conf"

 

Ãß°¡ Á¤º¸µé

[¾ÆÆÄÄ¡ ³×ÀÓ ±â¹Ý ¹öÃß¾ó È£½ºÆ® Áö¿ø]
http://www.apache.org/docs/vhosts/name-based.html
[¾ÆÆÄÄ¡ ¹öÃß¾ó È£½ºÆ® ¹®¼­]
http://www.apache.org/docs/vhosts/index.html
[¹öÃß¾ó È£½ºÆ® ¸ÅĪ¿¡ ´ëÇÑ ±íÀÌÀÖ´Â Åä·Ð]
http://www.apache.org/docs/vhosts/details.html

º» À¥ÆäÀÌÁö´Â ¸®´ª½ºÆ÷Ä¿½º ÆíÁýÀÚ ÆÀ¿¡ÀÇÇØ °ü¸®µË´Ï´Ù.
© Atif Ghaffar
LinuxFocus 1999

1999-11-06, generated by lfparser version 0.9

mirror server hosted at Truenetwork, Russian Federation.