´ÙÀ½ ÀÌÀü Â÷·Ê

8. ¾ÆÆÄÄ¡(Apache) HTTP ¼­¹ö ¼³Ä¡¿Í ¿î¿µ

´Ü¼øÇÑ Å¬¶óÀ̾ðÆ®·ÎÀÇ Àü¶ô! ÀÎÅͳ×Æ® »ç¿ëÀα¸°¡ ´Ã¾î³ª±ä Çصµ ±×¸®°í ³×Æ®¿öÅ© ¼Óµµ°¡ »¡¶óÁö±â´Â ÇßÁö¸¸ °³ÀÎ »ç¿ëÀÚµéÀº ¿©ÀüÈ÷ ÁøÁ¤ÇÑ(?) »ç¿ëÀÚ ¼öÁØ¿¡ ¸Ó¹°°í ÀÖ´Ù. ÇÏÁö¸¸ PC ÇÑ ´ë¿Í ¸®´ª½º ±×¸®°í Àû´çÇÑ ¼ÓµµÀÇ ³×Æ®¿öÅ©¸¸ ÀÖ´Ù¸é ÀÌÁ¦ ¿©·¯ºÐÀÇ ¸®´ª½º ¸Ó½ÅÀº ´õ ÀÌ»ó Ŭ¶óÀ̾ðÆ® ¸Ó½ÅÀÌ ¾Æ´Ï´Ù. À¥¼­ºñ½º¸¦ »ó¿ëÀ¸·Î ÇÒ °ÍÀÌ ¾Æ´Ï¶ó¸é ³×Æ®¿öÅ© ¼Óµµ´Â ¸ðµ©¼Óµµ Á¤µµ¸¸ µÅµµ »ó°ü¾øÁö ¾ÊÀ»±î? SLIPÀ̳ª PPP·Î µ¿Àû IP¸¦ ÇÒ´ç¹Þ¾Æ °¡²û ¿î¿µÇغ¸´Â °³ÀÎ ¼­¹öµµ Àç¹ÌÀÖÀ» °ÍÀÌ´Ù. Àá½Ã ¼­¹ö·Î ÀÛµ¿ÇÏ´Â ¿©·¯ºÐÀÇ ¸®´ª½º ¸Ó½ÅÀ¸·Î Ä£±¸µéÀ» ÃÊ´ëÇغ¸´Â °Íµµ ÁÁ´Ù. ÇöÀç Á¶»çµÈ ¹Ù¿¡ ÀÇÇϸé Àü¼¼°èÀûÀ¸·Î °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â À¥ ¼­¹ö´Â ´Ü¿¬ ¾ÆÆÄÄ¡ ¼­¹öÀÌ¸ç ¿ì¸®³ª¶ó¿¡¼­´Â NCSA¼­¹ö¸¦ °¡Àå ¸¹ÀÌ »ç¿ëÇÑ´Ù°í ÇÑ´Ù. ¸î °¡Áö ¹®¼­¸¦ ã¾Æº¸¸é ¿ì¸®³ª¶ó¿¡¼­ NCSA¼­¹ö°¡ °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â ÀÌÀ¯·Î ÇѱÛÈ­µÈ ¹®¼­°¡ ÀÖ´Ù´Â »ç½ÇÀ» µé°í ÀÖ´Ù. NCSA ¼­¹öÀÇ ¹ö±×¸¦ ¼öÁ¤Çϸ鼭 (¾ÆÆÄÄ¡ ¼­¹öÀÇ À̸§Àº NCSA 1.3¿¡ ´ëÇÑ A PAtCHy ¹öÀüÀ̶ó´Â ¸»·ÎºÎÅÍ À¯·¡µÈ °ÍÀ̶ó ÇÑ´Ù), °¡Àå ºü¸¥ ¼­¹ö·Î ÀÎÁ¤µÇ°í ÀÖÀ¸¸ç Àü¼¼°èÀûÀ¸·Î °¡Àå ¸¹ÀÌ »ç¿ëµÇ´Â ¾ÆÆÄÄ¡ ¼­¹ö¿¡ ´ëÇÑ ÇÑ±Û ¹®¼­°¡ ³ª¿Â´Ù¸é ÁÁÀº ¼º´ÉÀÇ ¾ÆÆÄÄ¡ ¼­¹ö°¡ ±¹³»¿¡¼­µµ ¸¹ÀÌ »ç¿ëµÇ¸®¶ó ¹ÏÀ¸¸ç ÀÌ ±ÛÀ» Àû´Â´Ù. ÇÊÀÚ°¡ Á¢ÇÒ ¼ö ÀÖ°í ¸¶À½´ë·Î »ç¿ëÇÒ ¼ö ÀÖ´Â À¯ÀÏÇÑ ½Ã½ºÅÛÀº ¸®´ª½ºÀ̱⠶§¹®¿¡ ¸®´ª½º¿¡¼­ÀÇ ¾ÆÆÄÄ¡ ¼­¹ö ¼³Ä¡/¿î¿µ ¹æ¹ý°ú »ç¿ëÀÚ È®ÀÎ(User Authentification)¿¡ ´ëÇØ °£´ÜÈ÷ ±â¼úÇÑ´Ù. ¾ÆÆÄÄ¡ ¼­¹ö ´ëºÎºÐÀÇ ±â´ÉÀº NCSA ¼­¹ö·ÎºÎÅÍ ¹°·Á¹ÞÀº °ÍÀ̱⠶§¹®¿¡ NCSA ¼­¹ö ¹®¼­¸¸À¸·Îµµ ÃæºÐÇÏÁö¸¸ ¾ÆÆÄÄ¡ ¼­¹ö ƯÀ¯ÀÇ ±â´É ¶Ç´Â È®ÀåµÈ °³³äµéÀÌ Á¸ÀçÇϹǷΠNCSA¿¡¼­ ã¾Æ ºÒ ¼ö ¾ø´Â ºÎºÐÀ» ÁÖ¸ñÇÏ°í ½Í´Ù. ´Ù¸¥ ¿î¿µÃ¼°è¿¡¼­ ¼³Ä¡, ¿î¿µÇÏ´Â ¹ýÀ̳ª ´õ ¸¹Àº Á¤º¸¸¦ ¿øÇÑ´Ù¸é ÀÌ ±Û ¸¶Áö¸·¿¡ ÀÖ´Â ¿©·¯ Âü°íÀÚ·áµéÀ» Á÷Á¢ ã¾Æº¸±â ¹Ù¶õ´Ù.

8.1 Áغñ»çÇ×

8.2 ¼³Ä¡

1) ¾ÆÆÄÄ¡ ¼­¹ö ¼Ò½º Ç®±â ¸ÕÀú ¾ÆÆÄÄ¡ ¼Ò½º¸¦ /usr/local/etc¿¡ º¹»çÇÏ°í ¾ÐÃàÀ» Ǭ´Ù.

/usr/local/etc# tar xvzf apache_1.1.1.tar.gz

apache_1.1.1À̶ó´Â µð·ºÅ丮°¡ »ý±â¸ç ¾ÆÆÄÄ¡ ¼­¹ö¿Í °ü·ÃµÈ ¸ðµç ÆÄÀÏÀÌ Ç®·Á ³ª¿Â´Ù. ÀϹÝÀûÀ¸·Î ¾ÆÆÄÄ¡ ¼­¹ö ¹èÆ÷º»Àº httpd¶ó´Â µð·ºÅ丮 ¾Æ·¡¿¡ ¼³Ä¡µÇ¹Ç·Î ¸µÅ©¸¦ ¸¸µé¾îÁְųª httpd ¶ó´Â À̸§À» ¹Ù²Ùµµ·Ï ÇÏÀÚ.

/usr/local/etc# mv apache_1.1.1 httpd

¶Ç´Â

/usr/local/etc# ln -s apache_1.1.1 httpd

2) µð·ºÅ丮 ¼³¸í ¾ÐÃàÀ» Ç®¾ú´Ù¸é ´ÙÀ½°ú °°Àº ³»¿ëÀ» º¼ ¼ö ÀÖ´Ù.

-rw-r--r--     1 129   kmem  3738 Mar 13  1996 CHANGES
-rw-r--r--     1 129   kmem   2604 Feb 22  1996 LICENSE
-rw-r--r--     1 129   kmem   3059 Jul  3 15:24 README
drwxr-xr-x     2 129  kmem   1024 Jul  9 04:04 cgi-bin/
drwxr-xr-x     2 129   kmem  1024 Jul  9 04:04 conf/
drwxr-xr-x     2 129   kmem  1024 Jul  9 04:04 htdocs/
drwxr-xr-x     2 129  kmem   2048 Jul  9 04:04 icons/
drwxr-xr-x     2 129  kmem   1024 Jul  9 04:04 logs/
drwxr-xr-x     2 129  kmem   2048 Jul 10 00:02 src/
drwxr-xr-x     2 129  kmem   1024 Jul  9 04:05 support/

µð·ºÅ丮¸í   µð·ºÅ丮 ³»¿ë
cgi-bin      CGI ½ºÅ©¸³Æ® ¸ðÀ½
conf         ¾ÆÆÄÄ¡ ½ÇÇàÇÒ ¶§ ȯ°æ ÃʱⰪ ¼³Á¤ÆÄÀÏ
htdocs       ÀϹÝÀûÀÎ ¼­¹ö ȨÆäÀÌÁö µð·ºÅ丮
icons        ¾ÆÆÄÄ¡ ¼­¹ö ÀÚüÀûÀ¸·Î »ç¿ëÇÏ´Â ¾ÆÀÌÄÜ
logs         ¿©·¯ °¡Áö »ç¿ë ±â·Ï ÀúÀå ÆÄÀÏ
src          ¾ÆÆÄÄ¡ ¼Ò½º
support      ¼­¹öÀÇ º¸¾È¿¡ °ü·ÃµÈ ÇÁ·Î±×·¥µéÀÌ µé¾îÀÖ´Ù.

8.3 ÄÄÆÄÀÏ Àü src/Configuration ÆÄÀÏ ¼öÁ¤

¸ÕÀú Configuration.tmpl ÆÄÀÏÀ» ConfigurationÀ¸·Î º¹»çÇÑ´Ù.

/usr/local/etc/httpd/src# cp Configuration.tmpl Configuration

¿¡µðÅÍ·Î ConfigurationÆÄÀÏÀ» ºÒ·¯µé¿© ¼öÁ¤À» ½ÃÀÛÇØ º¸ÀÚ.

Configuration ÆÄÀÏ¿¡ ÀÖ´Â ¸ðµâÀÇ ¸ñ·ÏÀº È°¼ºÈ­µÇµç µÇÁö ¾Êµç »ó°ü¾øÀÌ ¸ðµÎ src µð·ºÅ丮¿¡ ¼Ò½º·Î Æ÷ÇԵǾî ÀÖ´Ù. ÇÏÁö¸¸ »õ·Î¿î ±â´ÉÀÇ ¸ðµâµé ¿¹¸¦ µé¾î Æ÷½ºÆ®±×·¡½º95¿ë ¸ðµâÀÎ mod_auth_pg95À» »ç¿ëÇϱâ À§Çؼ­´Â ÇØ´ç ¼Ò½º¸¦ src µð·ºÅ丮¿¡ Æ÷ÇÔ½ÃÅ°°í ConfigurationÆÄÀÏ¿¡µµ Æ÷ÇÔ½ÃÄÑ¾ß ÇÑ´Ù. ¸ðµâÀº ÆÄÀÏÀÇ À̸§À» º¸¸é ±× ±â´ÉÀ» ´ë°­ ¾Ë ¼ö ÀÖÀ¸¸ç ´õ ÀÚ¼¼È÷ ¾Ë°íÀÚ ÇÑ´Ù¸é http://www.apache.org/docs/modules.html¿¡¼­ ¸¹Àº Á¤º¸¸¦ ¾òÀ» ¼ö ÀÖÀ» °ÍÀÌ´Ù. ±âº»ÀûÀ¸·Î Á¦°øµÇ°í È°¼ºÈ­µÈ ¸ðµâÀº ´ÙÀ½°ú °°´Ù.

mime_module
access_module
auth_module
negotiation_module
includes_module
dir_module
cgi_module
userdir_module
alias_module
env_module
common_log_module

±âº»ÀûÀ¸·Î Á¦°øµÇ³ª »ç¿ëÀÚ°¡ ¸í½ÃÀûÀ¸·Î È°¼ºÈ­½ÃÄÑ¾ß ÇÏ´Â °ÍµéÀº ´ÙÀ½°ú °°´Ù.

asis_module
imap_module
action_module
agent_log_module
referer_log_module
config_log_module
cern_meta_module
status_module
info_module
anon_auth_module
db_auth_module
dbm_auth_module
msql_auth_module
digest_module
dld_module
cookies_module
proxy_module

8.4 ÄÄÆÄÀÏ

¸ðµâ¼³Á¤±îÁö ¸¶ÃÆÀ¸¸é ÀÌÁ¦ ÀúÀåÀ» ÇÏ°í, ./Configure¸¦ ½ÇÇà½ÃŲ µÚ ÄÄÆÄÀÏÀ» ÇÑ´Ù.

/usr/local/etc/httpd/src# ./Configure
Using 'Configuration' as config file
/usr/local/etc/httpd/src# make

8.5 ¼­¹ö ȯ°æ ¼³Á¤

ÄÄÆÄÀÏÀÌ ¼º°øÀûÀ¸·Î ¿Ï·áµÇ¾úÀ¸¸é src µð·ºÅ丮¿¡ httpd°¡ »ý¼ºµÇ¾úÀ» °ÍÀÌ´Ù. ÀÌÁ¦´Â ¼­¹öÀÇ È¯°æÀ» ¼³Á¤ÇØ ÁÖÀÚ. conf µð·ºÅ丮¿¡´Â 4°³ÀÇ È¯°æ ¼³Á¤ÆÄÀÏÀÌ ÀÖ´Ù. ±× Áß *.conf-dist ÆÄÀÏÀ» *.conf·Î º¹»çÇÏ°í ±× º¹»çº»À» °¡Áö°í ¼­¹öÀÇ È¯°æ¼³Á¤À» ÇØÁÖÀÚ.

/usr/local/etc/httpd/conf# cp access.conf-dist access.conf
/usr/local/etc/httpd/conf# cp httpd.conf-dist httpd.conf
/usr/local/etc/httpd/conf# cp srm.conf-dist srm.conf

access.confÆÄÀÏ ¼öÁ¤

Directory¿¡ ÁöÁ¤µÈ µð·ºÅ丮¸¦ ¼­¹öÀÇ È¨µð·ºÅ丮·Î ÁöÁ¤ÇÑ´Ù.

<Directory /usr/local/etc/httpd/htdocs>
Options Indexes FollowSymLinks

°¡´ÉÇÑ ¿É¼ÇÀº ´ÙÀ½°ú °°´Ù.

None : ¾î¶² ¿É¼Çµµ ÀÌ¿ëÇÒ ¼ö ¾ø´Ù.
All : MultiViews ¿É¼ÇÀ» ÀÌ¿ëÇÒ ¼ö ÀÖ´Ù.
Indexes : URL¿¡ ÁöÁ¤µÈ µð·ºÅ丮¿¡ (index.html °°Àº)ÁöÁ¤µÈ ÆÄÀÏÀÌ ¾øÀ»
          °æ¿ì µð·ºÅ丮ÀÇ ÆÄÀÏ ¸ñ·ÏÀ» º¸¿©ÁÖ´Â ¿É¼Ç.
Includes : ¼­¹öÃøÀÇ Ãß°¡ÀûÀÎ Á¤º¸¸¦ Á¦°øÇÒ ¼ö ÀÖ°Ô ÇÑ´Ù.
FollowSymLinks : µð·ºÅ丮ÀÇ ½Éº¼¸¯ ¸µÅ©¸¦ »ç¿ë °¡´ÉÇÏ°Ô ÇÑ´Ù.
ExecCGI : CGI ½ºÅ©¸³Æ®¸¦ ½ÇÇàÇÒ ¼ö ÀÖ°Ô ÇÑ´Ù.
MultiViews : All ¿É¼ÇÀÌ ¼³Á¤µÇ¾úÀ» ¶§¸¸ ÁöÁ¤µÈ ¸ñ·ÏÀÇ multiviews¸¦ Çã¿ëÇÑ´Ù.

# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
AllowOverride None
.htaccessÆÄÀÏÀº ¼­¹öÀÇ °¢ µð·ºÅ丮¿¡ ´ëÇÑ Á¢±ÙÀ» Á¦¾îÇϱâ À§ÇÑ °ÍÀ¸·Î µð·ºÅ丮¿¡ .htaccessÆÄÀÏÀÌ ÀÖÀ¸¸é ¼­¹ö Àüü¿¡ ÀÛ¿ëÇÏ´Â access.confº¸´Ù ¿ì¼±±ÇÀ» °¡Áø´Ù. ´ÙÀ½Àº .htaccessÆÄÀÏ¿¡ ´ëÇÑ Override¿¡ ´ëÇÑ ¿É¼ÇÀÌ´Ù.

None : .htaccessÆÄÀÏÀ» ÀÐÀ» ¼ö ¾ø°Ô ÇÑ´Ù.
All : ¸ðµç ÁöÁ¤¿¡ ´ëÇØ °¡´ÉÇÏ°Ô ÇÑ´Ù.
Options : ±ÔÁ¤µÈ µð·ºÅ丮 Çü½ÄÀ» ÄÁÆ®·ÑÇÏ´Â ÁöÁ¤ÀÇ »ç¿ëÀ» Çã¶ôÇÑ´Ù.
FileInfo : ¹®¼­Çü½ÄÀ» ÄÁÆ®·ÑÇÏ´Â ÁöÁ¤ÀÇ »ç¿ëÀ» Çã¿ëÇÑ´Ù.
AuthConfig : »ç¿ëÀÚ ÀÎÁõ ÁöÁ¤ÀÇ »ç¿ëÀ» Çã¿ëÇÑ´Ù. »ç¿ëÀÚ ÀÎÁõ º¯¼ö¸¦ »ç¿ëÇÑ´Ù.
Limit : È£½ºÆ® Á¢±ÙÀ» ÄÁÆ®·ÑÇÏ´Â ÁöÁ¤À» Çã¿ëÇÑ´Ù.

# Controls who can get stuff from this server.
order allow,deny
allow from all

</Directory>

order : ¼­¹ö°¡ ¾×¼¼½º ÄÁÆ®·ÑÀ» ¼öÇàÇÏ´Â ¼ø¼­¸¦ ³ªÅ¸³½´Ù. allow±â´ÉÀ» ¸ÕÀú
        ¼öÇàÇÏ°í, deny±â´ÉÀ» ¼öÇàÇ϶ó´Â °ÍÀÌ´Ù.
allow from : ³ª¿­µÇ´Â Áּҵ鿡 ´ëÇÑ ¾×¼¼½º ÄÁÆ®·ÑÀ» °¡´ÉÇÏ°Ô ÇÑ´Ù. »ç¿ë
             °¡´ÉÇÑ ÁÖ¼Ò´Â µµ¸ÞÀÎ ³×ÀÓ, È£½ºÆ® À̸§ ÁÖ¼Ò, È£½ºÆ® ip ÁÖ¼Ò,
             ipÁÖ¼ÒÀÇ ¾ÕºÎºÐ 3¹ÙÀÌÆ®, ¸ðµç ÁÖ¼Ò¿¡ ÇØ´çÇÏ´Â allÀÌ ÀÖ´Ù.
deny from : allow from°ú ¹Ý´ëµÇ´Â °³³äÀÌ¸ç »ç¿ë °¡´ÉÇÑ ÁÖ¼Ò´Â allow from
            °ú °°´Ù.
require : »ç¿ëÀÚ, ±×·ì¿¡ ´ëÇÑ Á¢±ÙÀ» ÅëÁ¦ÇÒ ¼ö ÀÖ´Ù.
 »ç¿ë¹æ¹ý : require entity en1 en2 ... enn
            entity¿¡ µé¾î°¥ ¼ö ÀÖ´Â °ÍÀº user, group, valid-userÀÇ ¼¼ °¡ÁöÀÌ´Ù.
user : ÁöÁ¤µÈ »ç¿ëÀڵ鿡°Ô¸¸ Á¢±ÙÀ» Çã¿ëÇÏ´Â °ÍÀ¸·Î ÁöÁ¤µÈ »ç¿ëÀÚ¿¡ ´ëÇÑ
       Á¤º¸´Â AuthUserFile¿¡¼­ ÁöÁ¤ÇÑ ÆÄÀÏ¿¡ ÀÖ´Ù.
group : ÁöÁ¤µÈ ±×·ì¿¡°Ô¸¸ Á¢±ÙÀ» Çã¿ëÇÏ´Â °ÍÀ¸·Î ÁöÁ¤µÈ ±×·ì¿¡ ´ëÇÑ Á¤º¸´Â
        AuthGroupFile¿¡¼­ ÁöÁ¤ÇÑ ÆÄÀÏ¿¡ ÀÖ´Ù.
valid-user : AuthUserFile¿¡ ÀÖ´Â ¸ðµç »ç¿ëÀÚ¿¡ ´ëÇØ Á¢±ÙÀ» Çã¿ëÇÑ´Ù.

# /usr/local/etc/httpd/cgi-bin should be changed to whatever your
# ScriptAliased CGI directory exists, if you have that configured.
cgi-binµð·ºÅ丮¿¡ ´ëÇÑ Options¸¦ ÁöÁ¤ÇÑ´Ù. ¿É¼ÇÀº htdocs ¼³Á¤ÀÇ ¿É¼Ç°ú °°´Ù.

<Directory /usr/local/etc/httpd/cgi-bin>
AllowOverride None
Options None
</Directory>

¼­¹öÀÇ »óÅ°á°ú¸¦ http://servename/statusÀÇ URL¿¡ Á¢±ÙÇÏ¸é º¼ ¼ö ÀÖ°Ô ÇØÁÖ´Â ¿É¼ÇÀÌ´Ù. 'allow from ¼­¹ö µµ¸ÞÀÎ ³×ÀÓ' ÀÇ Çü½ÄÀ¸·Î Á¢±ÙÀÌ °¡´ÉÇÏ´Ù.

#</Location /status>
#SetHandler server-status
#order deny,allow
#deny from all
#allow from .nowhere.com
#</Location>

±× ¿Ü Á¢±Ù Á¦¾î¿¡ ´ëÇÑ °ü·Ã »çÇ×À» Ãß°¡·Î ÀÛ¼ºÇÒ ¼ö ÀÖ´Ù.

httpd.conf

# ServerType is either inetd, or standalone.
ServerType standalone
¼­¹öÀÇ Å¸ÀÔÀ» ÁöÁ¤ÇÏ´Â °ÍÀ¸·Î standaloneÀº httpd µ¥¸ó ÇÁ·Î¼¼½º°¡ »ç¿ëÀÚÀÇ
¿äûÀ» ó¸®ÇÏ´Â °ÍÀÌ°í inetd´Â inetd µ¥¸ó ÇÁ·Î¼¼½º°¡ ó¸®ÇÏ°Ô ÇÏ´Â °ÍÀÌ´Ù.
standaloneÀÌ ´õ È¿À²ÀûÀÎ ¹æ¹ýÀÌ´Ù.

Port 80
½Ã½ºÅÛ¿¡ ÀÇÇØ ¹Ì¸® httpd¸¦ À§ÇØ ¿¹¾àµÈ Æ÷Æ® ¹øÈ£´Â 80¹øÀÌ´Ù. 0¿¡¼­ 1023
±îÁöÀÇ Æ÷Æ®¹øÈ£´Â ½Ã½ºÅÛ¿¡ ÀÇÇØ ¹Ì¸® ¿¹¾àµÇ¾î ÀÖ´Ù. ±× ÀÌ»óÀÇ Æ÷Æ®¹øÈ£¸¦
ÁöÁ¤ÇÏ¿© ÀϹݻç¿ëÀÚµµ httpdÀ» ¼³Ä¡, ¿î¿µ °¡´ÉÇÏ´Ù. http://aaa.bbb.ccc:8080/
µîÀ¸·Î »ç¿ëÇÒ ¼ö ÀÖ´Ù.

HostnameLookups on
À¥¼­¹ö¿¡ ´ëÇÑ Á¢±ÙÀ» µµ¸ÞÀÎ ³×ÀÓÀ̳ª ipÁÖ¼Ò (on) ¶Ç´Â ipÁÖ¼Ò¸¸À¸·Î(off)
Á¢±ÙÇÏ°Ô ÇÒ °ÍÀÎÁö¸¦ °áÁ¤ÇÏ´Â °ÍÀÌ´Ù.

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch. 
# User/Group: The name (or #number) of the user/group to run httpd as.
#  On SCO (ODT 3) use User nouser and Group nogroup User nobody
Group #-1
ServerTypeÀÌ standaloneÀÏ ¶§¸¸ Àû¿ëµÇ´Â °ÍÀ¸·Î ¼­¹ö°¡ »ç¿ëÀÚÀÇ ¿äû¿¡ ´ëÇؼ­
»ý¼ºÇÏ´Â child httpd ÇÁ·Î¼¼½º¿¡ ´ëÇÑ user id, group id ÀÌ´Ù. ÀϹÝÀûÀ¸·Î
½Ã½ºÅÛ¿¡¼­ »ç¿ëÇÏÁö ¾Ê´Â °Íµé·Î ÁöÁ¤ÇÏ´Â °ÍÀÌ ¹Ù¶÷Á÷ÇÏ´Ù. ½½·¢ 3.1±â¹Ý
¹èÆ÷º»¿¡´Â /etc/group¿¡ nogroup -2°¡ ÁöÁ¤µÇ¾î ÀÖ´Ù.

# ServerAdmin: Your address, where problems with the server should be
# e-mailed.
ServerAdmin you@your.address
¼­¹ö °ü¸®ÀÚÀÇ e-mail ÁÖ¼Ò¸¦ ÁöÁ¤ÇÑ´Ù.

# ServerRoot: The directory the server's config, error, and log files
# are kept in
ServerRoot /usr/local/etc/httpd
¼­¹öÀÇ Root µð·ºÅ丮¸¦ ÁöÁ¤ÇÑ´Ù.

# ErrorLog: The location of the error log file. If this does not start
# with /, ServerRoot is prepended to it.
ErrorLog logs/error_log
¼­¹ö¿¡¼­ ¹ß»ýÇÏ´Â ¿¡·¯¸¦ ±â·ÏÇÏ´Â ·Î±× ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù.

# TransferLog: The location of the transfer log file. If this does not
# start with /, ServerRoot is prepended to it.
TransferLog logs/access_log
¼­¹ö¿¡ ´ëÇÑ »ç¿ëÀÚµéÀÇ ¿¢¼¼½º Á¤º¸¸¦ ±â·ÏÇÏ´Â ·Î±×ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù.

# PidFile: The file the server should log its pid to
PidFile logs/httpd.pid
httpd µ¥¸ó ÇÁ·Î¼¼½ºÀÇ ÇÁ·Î¼¼½º id¸¦ ±â·ÏÇÏ°í ÀÖ´Â ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù.

# ScoreBoardFile: File used to store internal server process information
ScoreBoardFile logs/apache_status
¼­¹ö ÇÁ·Î¼¼½ºÀÇ Á¤º¸¸¦ ´ã°í ÀÖ´Â ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù.

# ServerName allows you to set a host name which is sent back to clients
# for your server if it's different than the one the program would get (i.e.
# use "www" instead of the host's real name).
#
# Note: You cannot just invent host names and hope they work. The
# name you define here must be a valid DNS name for your host. If you
# don't understand this, ask your network administrator.
#ServerName new.host.name
¼­¹öÀÇ µµ¸ÞÀÎ ³×ÀÓÀ» ÁöÁ¤ÇÑ´Ù. ÀÚ½ÅÀÇ ¼­¹ö°¡ µµ¸ÞÀÎ ³×ÀÓÀ» °¡ÁöÁö ¾Ê¾Ò´Ù¸é
³öµÐ´Ù. °¡Á³´Ù¸é È°¼ºÈ­ ½ÃÄÑÁÖ°í µµ¸ÞÀÎ ³×ÀÓÀ» ±âÀÔÇÑ´Ù.

# Timeout: The number of seconds before receives and sends time out
#  n.b. the compiled default is 1200 (20 minutes !)
Timeout 400
Ŭ¶óÀ̾ðÆ®°¡ Á¤º¸¸¦ ¹ÞÀ» ¶§±îÁö ¼Ò¿äµÇ´Â ´ë±â½Ã°£ÀÇ ÃÖ´ë °ªÀ» ÁöÁ¤ÇÑ´Ù.
³×Æ®¿öÅ©°¡ ÀÀ´äÀÌ ´ÊÀ» ¼ö·Ï ¼öÄ¡¸¦ ´Ã¸®´Â °ÍÀÌ ÁÁ´Ù.

# KeepAlive: The number of Keep-Alive persistent requests to accept
# per connection. Set to 0 to deactivate Keep-Alive support
KeepAlive 5
Á¢¼ÓµÈ ä·Î Ưº°ÇÑ ¿äûÀÌ ¾øÀ½¿¡µµ °è¼Ó ¿¬°áÀ» À¯Áö½Ãų ¼öÄ¡¸¦ ÁöÁ¤ÇÑ´Ù.

# KeepAliveTimeout: Number of seconds to wait for the next request
KeepAliveTimeout 15
KeepAlive°¡ ÁöÁ¤µÇ¾úÀ» ¶§ ´ÙÀ½ ¿äûÀ» ±â´Ù¸®´Â ¼öÄ¡¸¦ ÃÊ ´ÜÀ§·Î ÁöÁ¤ÇÑ´Ù.

# Server-pool size regulation. Rather than making you guess how many
# server processes you need, ¾ÆÆÄÄ¡ dynamically adapts to the load it
# sees --- that is, it tries to maintain enough server processes to
# handle the current load, plus a few spare servers to handle transient
# load spikes (e.g., multiple simultaneous requests from a single
# Netscape browser).
# It does this by periodically checking how many servers are waiting
# for a request. If there are fewer than MinSpareServers, it creates
# a new spare. If there are more than MaxSpareServers, some of the
# spares die off. These values are probably OK for most sites ---
MinSpareServers 5
MaxSpareServers 10
httpd µ¥¸óÇÁ·Î¼¼½ºÀÇ child ÇÁ·Î¼¼½º¿¡ ´ëÇØ MinSpare Serversº¸´Ù ÀÛÀ¸¸é »õ
·Î¿î ÇÁ·Î¼¼½º¸¦ »ý¼ºÇÏ°í MaxSpare Serversº¸´Ù ¸¹À¸¸é ¿©ºÐÀÇ ÇÁ·Î¼¼½º¸¦
Á×ÀÌ´Â(kill) °ÍÀ» ÁöÁ¤ÇÑ´Ù.

# Number of servers to start --- should be a reasonable ballpark figure.
StartServers 5
httpd ¼­¹ö¸¦ óÀ½ ½ÇÇà½Ãų ¶§ ¿©ºÐÀÇ ÇÁ·Î¼¼½º¸¦ »ý¼º½Ãų ¼öÄ¡¸¦ ÁöÁ¤ÇÑ´Ù.

# Limit on total number of servers running, i.e., limit on the number
# of clients who can simultaneously connect --- if this limit is ever
# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO
LOW.
# It is intended mainly as a brake to keep a runaway server from taking
# Unix with it as it spirals down...
MaxClients 150
Çѹø¿¡ Á¢±Ù °¡´ÉÇÑ Å¬¶óÀ̾ðÆ®ÀÇ ¼öÄ¡¸¦ ÁöÁ¤ÇÑ´Ù.

# MaxRequestsPerChild: the number of requests each child process is
# allowed to process before the child dies.
# The child will exit so as to avoid problems after prolonged use when
# ¾ÆÆÄÄ¡ (and maybe the libraries it uses) leak. On most systems, this
# isn't really needed, but a few (such as Solaris) do have notable leaks
# in the libraries.
MaxRequestsPerChild 30
child ÇÁ·Î¼¼½º°¡ ÀÀ´äÇÒ ¼öÄ¡¸¦ ÁöÁ¤ÇÑ´Ù. ¾Æ¸¶ ¸®´ª½º¿¡¼­´Â »ó°ü ¾ø´Â µíÇÏ´Ù.

# Proxy Server directives. Uncomment the following line to
# enable the proxy server:
#ProxyRequests On
¾ÆÆÄÄ¡ ¼­¹ö´Â ÇÁ¶ô½Ã ¼­¹öÀÇ ±â´Éµµ Çϴµ¥ onÀ¸·Î È°¼ºÈ­ ½ÃÄÑÁÖ¸é µÈ´Ù.

# To enable the cache as well, edit and uncomment the following lines:
#CacheRoot /usr/local/etc/httpd/proxy
#CacheSize 5
#CacheGcInterval 4
#CacheMaxExpire 24
#CacheLastModifiedFactor 0.1
#CacheDefaultExpire 1
#NoCache adomain.com anotherdomain.edu joes.garage.com
ÇÁ¶ô½Ã ¼­¹ö¸¦ ÁöÁ¤ÇßÀ» ¶§ ÇÊ¿äÇÑ ¼³Á¤µéÀÌ´Ù.
Virtual È£½ºÆ® °ü·ÃµÈ ºÎºÐÀº mini FAQÀÇ Virtual-Web¹®¼­¸¦ Àо±â ¹Ù¶õ´Ù.

srm.conf

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot /usr/local/etc/httpd/htdocs
'access.conf'ÀÇ DocumentRoot ÁöÁ¤ºÎºÐ°ú µ¿ÀÏÇÏ´Ù.
# UserDir: The name of the directory which is appended onto a user's
# home directory if a ~user request is recieved.
UserDir public_html
½Ã½ºÅÛÀ» »ç¿ëÇÏ´Â ÀÏ¹Ý »ç¿ëÀÚµéÀÇ °³ÀÎ À¥ Ȩ µð·ºÅ丮¸¦ ÁöÁ¤ÇÑ´Ù.
$HOME/public_html µð·ºÅ丮¸¦ ¸¸µé¾î¼­ ȨÆäÀÌÁö¸¦ µî·ÏÇÒ ¼ö ÀÖ´Ù.
µð·ºÅ丮¸íÀº ¼­¹ö °ü¸®ÀÚ°¡ º¯°æÇÒ ¼ö ÀÖ´Ù.

# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
DirectoryIndex index.html
ƯÁ¤ ÆÄÀÏÀ» ÁöÁ¤ÇÏÁö ¾Ê°í µð·ºÅ丮¸¸ ÁöÁ¤ÇßÀ» ¶§ ºÒ·¯µéÀÏ ¹®¼­¸¦ ÁöÁ¤ÇÑ´Ù.

# FancyIndexing is whether you want fancy directory indexing or
# standard
FancyIndexing on
µð·ºÅ丮ÀÇ ³»¿ëÀ» º¸¿©ÁÙ ¶§ ÁöÁ¤µÈ ¾ÆÀÌÄÜÀ¸·Î º¸¿©ÁÙ °ÍÀÎÁö ÁöÁ¤ÇÑ´Ù.

# AddIcon tells the server which icon to show for different files or
# filename extensions
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
....(Áß·«)
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
ÁöÁ¤µÈ ¾ÆÀÌÄÜ ¸ñ·ÏÀÌ´Ù.

# DefaultIcon is which icon to show for files which do not have an icon
# explicitly set.
DefaultIcon /icons/unknown.gif
¾ÆÀÌÄÜ ¸ñ·Ï¿¡ ¾ø´Â ÆÄÀÏÀ» º¸¿©ÁÙ ¶§ »ç¿ëµÉ ¾ÆÀÌÄÜÀ» ÁöÁ¤ÇÑ´Ù.

# AddDescription allows you to place a short description after a file in
# server-generated indexes.
# Format: AddDescription "description" filename
# ReadmeName is the name of the README file the server will look for
# by default. Format: ReadmeName name
#
# The server will first look for name.html, include it if found, and it will
# then look for name and include it as plaintext if found.
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName README
HeaderName HEADER
µð·ºÅ丮 ¸ñ·ÏÀ» º¸¿©ÁÙ ¶§ ¸ñ·ÏÀÇ ¸¶Áö¸· ºÎºÐ µÚ¿Í ¸ñ·ÏÀÇ ½ÃÀÛ Àü¿¡ º¸¿©ÁÙ
³»¿ëÀ» ´ã°í ÀÖ´Â ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù. ¿©±â¼­´Â ¸ñ·ÏÀÇ µÚ¿¡ README, ¸ñ·ÏÀÇ
óÀ½¿¡ HEADER¸¦ º¸¿©ÁÖ°Ô ÁöÁ¤µÇ¾î ÀÖ´Ù.

# IndexIgnore is a set of filenames which directory indexing should ignore
# Format: IndexIgnore name1 name2...
IndexIgnore */.??* *~ *# */HEADER* */README* */RCS
µð·ºÅ丮¸¦ Ãâ·ÂÇÒ ¶§ ¹«½ÃÇÒ ÆÄÀϵéÀ» ÁöÁ¤ÇÑ´Ù.

# AccessFileName: The name of the file to look for in each directory
# for access control information.
AccessFileName .htaccess
¼­¹ö°¡ µð·ºÅ丮¸¦ Ãâ·ÂÇÒ ¶§ Âü°íÇÒ ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù.

# DefaultType is the default MIME type for documents which the server
# cannot find the type of from filename extensions.
DefaultType text/plain
»ç¿ëÀÚÀÇ ¿äûÀ¸·Î °¢ ÆÄÀÏ¿¡ ´ëÇÑ ÇൿÀ» ÃëÇÒ ¶§ ¼­¹ö°¡ ¾ËÁö ¸øÇÏ´Â Çü½ÄÀÇ
ÆÄÀÏÀÏ °æ¿ì Ç¥½Ã Çü½ÄÀ» ÁöÁ¤ÇÑ´Ù.

# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+)
# uncompress information on the fly. Note: Not all browsers support this.
AddEncoding x-compress Z
AddEncoding x-gzip gz
¾ÐÃà Äڵ忡 ´ëÇÑ ÀÎÄÚµùÁ¤º¸¸¦ ÁöÁ¤ÇÑ´Ù.

# Redirect allows you to tell clients about documents which used to exist
# in your server's namespace, but do not anymore. This allows you to tell
# theclients where to look for the relocated document.
# Format: Redirect fakename url
°¡»ó ÀÚ·áÆÄÀÏÀ» url¿¡ ÁöÁ¤µÈ ¹®¼­·Î Redirect ÇÑ´Ù.

# Aliases: Add here as many aliases as you need (with no limit). The for
# mat is Alias fakename realname
#Alias /icons/ /usr/local/etc/httpd/icons/
ÆÄÀϸíÀ̳ª µð·ºÅ丮¸íÀ» alias ÇÒ ¼ö ÀÖ´Ù. È°¼ºÈ­ ½ÃÄÑÁØ´Ù.

# ScriptAlias: This controls which directories contain server scripts.
# Format: ScriptAlias fakename realname
#ScriptAlias /cgi-bin/ /usr/local/etc/httpd/cgi-bin/
¼­¹ö¿¡¼­ »ç¿ëÇÏ´Â cgi¸¦ ´ãÀº µð·ºÅ丮¸¦ ÁöÁ¤ÇÑ´Ù. ÀÌ µð·ºÅ丮ÀÇ ÆÄÀϵéÀº
¼­¹ö¿¡ ÀÇÇØ cgi½ºÅ©¸³Æ®·Î ÀνĵȴÙ. È°¼ºÈ­ ½ÃÄÑÁØ´Ù.
AddTypeÀº ext¿¡ ÇØ´çÇÏ´Â È®ÀåÀÚ¸¦ °¡Áø ÆÄÀÏÀ» mime.types¿¡ ±â¼úµÈ mime
typeÇüÅ·ΠÁ¤ÀÇ ÇÏ´Â °ÍÀÌ´Ù.
Çü½Ä : AddType type/subtype ext1
AddHandler¿ª½Ã ext¿¡ ÇØ´çÇÏ´Â È®ÀåÀÚ¿¡ ´ëÇÑ Çൿ ¾ç½ÄÀ» Á¤ÀÇÇÏ´Â °ÍÀÌÁö
¸¸, ÀϹÝÀûÀÎ È®ÀåÀÚ¸¦ °¡Áø ÆÄÀϵ鿡 ´ëÇÑ Á¤ÀǸ¦ ÇÑ´Ù.
Çü½Ä : AddHandler action-name ext1

# To use CGI scripts:
#AddHandler cgi-script .cgi
¼­¹öÀÇ ¾î¶² À§Ä¡¿¡ ÀÖ´øÁö .cgi È®ÀåÀÚ¸¦ °¡Áø ÆÄÀÏÀº cgi-script·Î ÀνÄÇÏ°Ô
ÇÑ´Ù.
.pl, .sh µîÀÇ ´Ù¸¥ È®ÀåÀÚµµ Ãß°¡ÇÒ ¼ö ÀÖ´Ù.

# To use server-parsed HTML files
#AddType text/html .shtml
#AddHandler server-parsed .shtml
Server Side Includes (SSI)¸¦ »ç¿ëÇÒ ¶§ ÇÊ¿äÇÏ´Ù. SSI´Â HTMLÆÄÀÏ ¼Ó¿¡ ¾î
¶² ½ÇÇà ÇÁ·Î±×·¥ÀÇ °á°ú³ª ƯÁ¤ ÆÄÀÏÀ» Æ÷ÇÔÇÒ ¼ö ÀÖ°Ô ÇÑ´Ù.

# Uncomment the following line to enable ¾ÆÆÄÄ¡'s send-asis HTTP file
# feature
#AddHandler send-as-is asis
mime type sttpd/send-as-is¿¡ ´ëÇÑ ¼³Á¤ÀÌ´Ù.

# If you wish to use server-parsed imagemap files, use
#AddHandler imap-file map
mime type application/x-httpd-imap¿¡ ´ëÇÑ ¼³Á¤ÀÌ´Ù.

ÁöÁ¤µÈ media type¿¡ ´ëÇØ ÇØ´ç ½ºÅ©¸³Æ®¸¦ ½ÇÇà °¡´ÉÇÏ°Ô ÇÒ ¼ö ÀÖ´Ù.
Çü½Ä : Action media/type /cgi-script/location
Çü½Ä : Action handler-name /cgi-script/location
¿¹) Action text/html /cgi-bin/footer
CERN HTTP ¼­¹öÀÇ meta informationÀ» emulateÇØ ÁØ´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº
CERN HTTP ¼­¹ö¹®¼­¸¦ Àо±æ ¹Ù¶õ´Ù.

# MetaDir: specifies the name of the directory in which ¾ÆÆÄÄ¡ can find
# meta information files. These files contain additional HTTP headers
# to include when sending the document

#MetaDir .web

# MetaSuffix: specifies the file name suffix for the file containing the
# meta information.

#MetaSuffix .meta


# Customizable error response (¾ÆÆÄÄ¡ style)
# these come in three flavors
# ¼­¹ö ¿¡·¯¿¡ ´ëÇÑ ÀÀ´äÀ» ÁöÁ¤ÇØ ÁÙ ¼ö ÀÖ½À´Ï´Ù.
# °¢ ¿¡·¯ Äڵ忡 ´ëÇÑ ÀÀ´äÀ» cgi³ª ÀÏ¹Ý ÅؽºÆ®·Î ¸¸µé¾î¼­ »ç¿ëÀÚ¿¡°Ô
º¸¿©ÁÙ ¼ö ÀÖ´Ù. ¾î¶² ¼­¹ö¿¡ Á¢¼ÓÇϸé ÇØ´ç URLÀÌ ¾ø´Ù´Â µîÀÇ Çѱ۸޽ÃÁö°¡
°¡´ÉÇÑ °Íµµ ÀÌ°ÍÀ» ÀÌ¿ëÇÏ´Â °ÍÀÌ´Ù.
#    1) plain text
#ErrorDocument 500 "The server made a boo boo.
#  n.b.  the (") marks it as text, it does not get output
#
#    2) local redirects
#ErrorDocument 404 /missing.html
#  to redirect to local url /missing.html
#ErrorDocument 404 /cgi-bin/missing_handler.pl
#  n.b. can redirect to a script or a document using server-side-includes.
#
#    3) external redirects
#ErrorDocument 402 http://other.server.com/subscription_info.html
#

mime.types

mime.typesÆÄÀÏÀº ¼­¹ö¿¡ ÀÇÇØ ¸®ÅϵǴ ÆÄÀÏÀÇ ÆÄÀϸí°ú MIMEÇü½ÄÀ» ±â¼úÇÏ´Â
°Í¿¡ ´ëÇØ ±ÔÁ¤ÇÑ´Ù.
type/subtype ext1 ext2 ext3 ...À¸·Î ±â¼úµÇ¸ç ext1 µîÀº ÆÄÀϸíÀÌ ÇØ´ç È®ÀåÀÚ¸¦
°¡Á³À» ¶§ Ŭ¶óÀ̾ðÆ®¿¡°Ô Àü´ÞµÇ´Â È®ÀåÀÚÀÌ´Ù.
¿¹) video/mpeg                      mpeg mpg mpe

8.6 ¼­¹öÀÇ ½ÇÇà

À§¿¡¼­¿Í °°ÀÌ È¯°æ¼³Á¤À» ¸¶ÃÆÀ¸¸é, ¾ÆÆÄÄ¡ ¼­¹ö¸¦ ½ÇÇà½ÃÄѺ¸ÀÚ. ·çÆ® ±ÇÇÑÀ¸·Î

/usr/local/etc/httpd/src/httpd -f /usr/local/etc/httpd/conf/httpd.conf
¸¦ ½ÇÇàÇصµ µÇ¸ç /etc/ rc.d/rc.local µî¿¡ À§ÀÇ ³»¿ëÀ» »ðÀÔÇÏ¸é ºÎÆÃÇÒ ¶§ ÀÚµ¿À¸·Î ¾ÆÆÄÄ¡ ¼­¹ö°¡ ÀÛµ¿ÇÑ´Ù.

»ç¿ë °¡´ÉÇÑ ¿É¼ÇÀº ´ÙÀ½°ú °°´Ù.

-d serverroot º¸Åë httpd.conf¿¡ ÁöÁ¤µÈ ServerRoot º¯¼ö¿¡ ´ëÇÑ ÁöÁ¤À» ÇÒ
              ¼ö ÀÖ°Ô ÇÑ´Ù. µðÆúÆ®´Â /usr/local/etc/httpd ÀÌ´Ù.

-f config     ȯ°æ¼³Á¤ ÆÄÀÏÀ» ÁöÁ¤Çؼ­ ½ÃÀÛÇÏ°Ô ÇÑ´Ù. ÁöÁ¤µÈ configÆÄÀÏÀÌ
              / ·Î ½ÃÀÛÇÏÁö  ¾ÊÀ¸¸é ServerRoot¿¡ ´ëÇÑ »ó´ëÆнº·Î ÀνÄÇÑ´Ù.
              µðÆúÆ®´Â conf/httpd.conf ÀÌ´Ù.

-X            ³»ºÎÀûÀÎ Å×½ºÆ®¸¦ À§ÇØ ½Ì±Û ÇÁ·Î¼¼½º ¸ðµå·Î ½ÇÇà½ÃŲ´Ù.
              ¼­¹ö µ¥¸óÀº ¾Æµé ÇÁ·Î¼¼½º¸¦ forkÇÏÁö ¾Ê´Â´Ù.  À¥¼­ºñ½º¸¦ ÇÏ·Á¸é
              ÀÌ ¸ðµå¸¦ »ç¿ëÇÏÁö ¸»¶ó.

-v            httpdÀÇ ¹öÀüÀ» ÇÁ¸°Æ®ÇÏ°í ½ÇÇàÀ» ¸¶Ä£´Ù.

-?            httpdÀÇ ¿É¼ÇÀ» ÇÁ¸°Æ®ÇÏ°í ½ÇÇàÀ» ¸¶Ä£´Ù.

8.7 »ç¿ëÀÚ ÀÎÁõ(User Authentication)

»ç¿ëÀÚ°¡ ¹®¼­¿¡ Á¢±ÙÇÏ·Á ÇÒ ¶§ »ç¿ëÀÚ¸¦ È®ÀÎÇÏ´Â °ÍÀ» ¸»ÇÑ´Ù. ÀÌ°ÍÀº »ç¿ëÀÚÀÇ ¾ÆÀ̵ð¿Í Æнº¿öµå¸¦ È®ÀÎÇÔÀ¸·Î½á °¡´ÉÇÏ´Ù. »ç¿ëÀÚ ÀÎÁõÀ» À§Çؼ­´Â ´ÙÀ½ ȯ°æº¯¼ö¸¦ ÁöÁ¤ÇØ ÁÖ¾î¾ß ÇÑ´Ù. conf/access.confÆÄÀÏ¿¡ ÁöÁ¤ÇÏ¸é ¼­¹öÀÇ ¸ðµç µð·ºÅ丮¸¦ ´ë»óÀ¸·Î ÇÏ°í °¢ µð·ºÅ丮¿¡ conf/srm.confÀÇ Access FileNameº¯¼ö¿¡¼­ ÁöÁ¤ÇÑ ÆÄÀÏÀ̸§(º¸Åë .htaccess)ÀÌ Á¸ÀçÇÏ¸é ±× ÆÄÀÏÀ» ÂüÁ¶ÇÑ´Ù. conf/access.conf ÆÄÀÏÀÇ µð·ºÅ丮 ÁöÁ¤ºÎºÐ¿¡ AllowOverride AuthConfigÁöÁ¤À» ÇØÁÖ¸é ¾Æ·¡ÀÇ È¯°æº¯¼ö¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù. access.confÆÄÀÏÀÇ ¼³¸íÀ» ÂüÁ¶Çϱ⠹ٶõ´Ù.

AuthType Basic

»ç¿ëÇÏ´Â ÀÎÁõÀÇ ¹æ½ÄÀ» ÁöÁ¤ÇÑ´Ù. ÇöÀç±îÁö Basic¸¸ ±¸ÇöµÇ¾î ÀÖ´Ù.

AuthName somedomain

»ç¿ëÀÚ ÀÎÁõÀ» È®ÀÎÇÏ´Â È®ÀÎóÀÇ À̸§À» ¹àÈù´Ù. ¿©·¯ À̸§À» ³ª¿­ÇÒ ¼ö ÀÖ´Ù.

AuthUserFile /web/users

ÀÎÁõµÈ »ç¿ëÀÚÀÇ µ¥ÀÌÅ͸¦ º¸°üÇÒ ÆÄÀÏÀ» ÁöÁ¤ÇÑ´Ù. supportµð·ºÅ丮¿¡ º¸¸é ¸î °¡Áö º¸¾È¿¡ °ü·ÃµÈ ÇÁ·Î±×·¥µéÀÌ ¼Ò½º ÇüÅ·ΠÁ¸ÀçÇÑ´Ù. ÀÌ°ÍÀ» make¸í·ÉÀ» ÁÖ¾î ÄÄÆÄÀÏÇÏ°í ³ª¸é ½ÇÇà °¡´ÉÇÑ ÆÄÀϵé Áß htpasswd¶ó´Â ¸í·ÉÀÌ »ý¼ºµÇ¸ç ÀÌ ¸í·ÉÀÌ »ç¿ëÀÚ¸¦ µî·Ï½ÃÅ°´Â ÀÏÀ» ¼öÇàÇÑ´Ù. /web/¿¡ ÁöÁ¤µÈ µð·ºÅ丮¿¡¼­ ../support/htpasswd -c users username ¶ó°í ÇØÁÖ¸é »ç¿ëÀÚ°¡ »ý¼ºµÇ¸ç »õ·Î¿î »ç¿ëÀÚ µî·ÏÀº -c ¿É¼ÇÀ» »©°í ¸í·ÉÀ» ÁÖ¸é µÈ´Ù. »ç¿ëÀÚ »èÁ¦´Â ÇØ´ç ÆÄÀÏ¿¡¼­ »ç¿ëÀÚ µ¥ÀÌÅÍ ºÎºÐÀ» »èÁ¦ÇØÁÖ¸é µÈ´Ù.

AuthGroupFile /web/groups

ÀÎÁõµÈ ±×·ìÀÇ µ¥ÀÌÅ͸¦ º¸°üÇÑ´Ù. ÀÌ ÆÄÀÏÀº Á÷Á¢ ¸¸µé¾î ÁÖ¸é µÈ´Ù.

 ¿¹)  group1: user1 user2 user3
      group2: user2 user5 user6

´ÙÀ½Àº /usr/local/etc/httpd/htdocs µð·ºÅ丮ÀÇ Á¢±Ù Á¦¾î¸¦ AuthUserFile¿¡ ÁöÁ¤µÈ »ç¿ëÀÚ¿¡ ´ëÇؼ­¸¸ Á¢±ÙÀ» Çã¿ëÇϵµ·Ï ¼³Á¤À» ¸¶Ä£ access.confÀÇ ³»¿ëÀÌ´Ù.

<Directory /usr/local/etc/httpd/htdocs>
Options Indexes FollowSymLinks
AllowOverride AuthConfig
order allow,deny
allow from all
AuthType Basic
AuthName liberty
AuthUserFile /usr/local/etc/httpd/conf/users
AuthGroupFile /usr/local/etc/httpd/conf/group
require valid-user
</Directory>

8.8 ¸®´ª½º ÆÄÀÏ ½Ã½ºÅÛ Ç¥ÁØ¿¡ µû¸£±â

¾ËÂ¥¿þ¾î¿¡ ÀÖ´Â ¾ÆÆÄÄ¡ 1.0 À» ¼³Ä¡ÇÏ¸é ¾ÆÆÄÄ¡ ½ÇÇà ÆÄÀÏÀ» Á¦¿ÜÇÏ°í´Â cgi-bin, conf, htdocs, icons, logs µîÀÇ µð·ºÅ丮°¡ ¸ðµÎ /var/lib/httpd¶ó´Â µð·ºÅ丮 ¾Æ·¡ ÀÖÀ½À» ¾Ë ¼ö ÀÖ´Ù. ¸®´ª½º ÆÄÀÏ ½Ã½ºÅÛ Ç¥ÁØ¿¡¼­´Â ½Ã½ºÅÛ ¿î¿µ µµÁß¿¡ °»½ÅµÇ´Â ÀÚ·áµé¿¡ ´ëÇؼ­´Â /usr ÆÄƼ¼Ç ¾Æ·¡ µÎ´Â °ÍÀ» ±ÇÀåÇÏÁö ¾Ê´Â´Ù. ƯÈ÷ htdocs, logs µîÀº ºó¹øÇÏ°Ô º¯È­ÇÏ´Â µð·ºÅ丮À̹ǷΠ/var¿¡ À§Ä¡ÇÏ°í ÀÖ¾î¾ß ÇÑ´Ù. ÀÌÀü ¾ÆÆÄÄ¡ ¼­¹ö¸¦ ¼³Ä¡Çß´Ù¸é ¿ì¼±Àº pkgtoolÀ» °¡Áö°í »èÁ¦¸¦ ÇÑ´Ù. ±×¸®°í /usr/local/etc/httpd¿¡ ÀÖ´Â °ÍµéÀ» ¸ðµÎ /var/lib/httpd·Î ¿Å±ä ´ÙÀ½ /usr/local/etc/httpd´Â ´ÜÁö /var/lib/httpd¿¡ ´ëÇÑ ¸µÅ©·Î ¸¸µé¾îµÎ´Â °ÍÀÌ ÁÁ´Ù. ÆÄÀÏ ½Ã½ºÅÛ Ç¥ÁØ¿¡ ´ëÇؼ­ Àß ¸ð¸£´Â »ç¶÷Àº ±×³É ³Ñ¾î°¡µµ ÁÁ´Ù.

8.9 ¸¶Ä¡¸ç

°¡Àå ÁÁÀº À¥¼­¹ö·Î ÀÎÁ¤µÇ´Â ¾ÆÆÄÄ¡ ¼­¹ö°¡ ´ÜÁö ¼Ò°³ ±Û Çϳª ¾ø´Ù´Â ÀÌÀ¯·Î ±¹³»¿¡¼­´Â °ÅÀÇ ¾²ÀÌÁö ¾Ê°í ÀÖ´Ù´Â °Í¿¡ ¾ÈŸ±î¿òÀ» ´À³¢¸ç ÀûÀº Áö½ÄÀ̳ª¸¶ ¾ÆÆÄÄ¡ ¼­¹ö¸¦ ¿î¿µÇغ» °æÇèÀ» ¹ÙÅÁÀ¸·Î ÀÌ ±ÛÀ» ½è´Ù. ÀÌÈÄ SSL(Secure Socket Layer) µîÀÇ ¾ÆÆÄÄ¡ ¼­¹öÀÇ ¸¹Àº ±â´ÉÀ» Á¤¸®ÇÑ ±ÛÀ» ÀÛ¼ºÇÒ ¿¹Á¤ÀÌ´Ù.


´ÙÀ½ ÀÌÀü Â÷·Ê