Apache HTTP Server Version 2.2
This document refers to the 2.2 version of Apache httpd, which is no longer maintained. The active release 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.
¿©·¯ »ç¿ëÀÚ°¡ ÀÖ´Â ½Ã½ºÅÛ¿¡¼ UserDir
Áö½Ã¾î¸¦ »ç¿ëÇϸé
°¢ »ç¿ëÀÚ´Â ÀÚ½ÅÀÇ È¨µð·ºÅ丮 ¾È¿¡ À¥»çÀÌÆ®¸¦ ¸¸µé ¼ö ÀÖ´Ù.
URL http://example.com/~username/
¿¡ Á¢±ÙÇϸé
»ç¿ëÀÚ "username
"ÀÇ È¨µð·ºÅ丮¿¡¼ UserDir
Áö½Ã¾î·Î ÁöÁ¤ÇÑ
ÇÏÀ§µð·ºÅ丮¿¡ ÀÖ´Â ÆäÀÌÁö¸¦ °¡Á®¿À°Ô µÈ´Ù.
°ü·ÃµÈ ¸ðµâ | °ü·ÃµÈ Áö½Ã¾î |
---|---|
UserDir
Áö½Ã¾î´Â »ç¿ëÀÚº° ÆäÀÌÁö¸¦ °¡Á®¿Ã µð·ºÅ丮¸¦ ÁöÁ¤ÇÑ´Ù. ÀÌ
Áö½Ã¾îÀÇ »ç¿ë¹ýÀº ¿©·¯°¡Áö´Ù.
½½·¡½¬·Î ½ÃÀÛÇÏÁö¾Ê´Â °æ·Î¸¦ ÁöÁ¤ÇÏ¸é °¢ »ç¿ëÀÚÀÇ È¨µð·ºÅ丮¿¡ »ó´ëÀûÀÎ µð·ºÅ丮 °æ·Î·Î ó¸®ÇÑ´Ù. ¿¹¸¦ µé¾î, ¾Æ·¡ ¼³Á¤ÀÇ °æ¿ì:
UserDir public_html
URL http://example.com/~rbowen/file.html
˼
ÆÄÀÏ °æ·Î /home/rbowen/public_html/file.html
À»
¶æÇÑ´Ù.
½½·¡½¬·Î ½ÃÀÛÇÏ´Â °æ·Î¸¦ ÁöÁ¤Çϸé ÁöÁ¤ÇÑ µð·ºÅ丮¿¡ »ç¿ëÀÚ¸íÀ» ´õÇÑ µð·ºÅ丮 °æ·Î¸¦ »ç¿ëÇÑ´Ù. ¿¹¸¦ µé¾î, ¾Æ·¡ ¼³Á¤ÀÇ °æ¿ì:
UserDir /var/html
URL http://example.com/~rbowen/file.html
˼
ÆÄÀÏ °æ·Î /var/html/rbowen/file.html
À» ¶æÇÑ´Ù.
º°Ç¥ (*)¸¦ Æ÷ÇÔÇÑ °æ·Î¸¦ ÁöÁ¤ÇÏ¸é º°Ç¥¸¦ »ç¿ëÀÚ¸íÀ¸·Î ´ëüÇÑ °æ·Î¸¦ »ç¿ëÇÑ´Ù. ¿¹¸¦ µé¾î, ¾Æ·¡ ¼³Á¤ÀÇ °æ¿ì:
UserDir /var/www/*/docs
URL http://example.com/~rbowen/file.html
˼
ÆÄÀÏ °æ·Î /var/www/rbowen/docs/file.html
À»
¶æÇÑ´Ù.
UserDir ¹®¼¿¡ ÀÖ´Â ¹®¹ýÀ» »ç¿ëÇÏ¿© »ç¿ëÀÚº° À¥µð·ºÅ丮 ±â´ÉÀ» ÀÌ¿ëÇÒ ¼ö ÀÖ´Â »ç¿ëÀÚ¸¦ Á¦ÇÑÇÒ ¼ö ÀÖ´Ù:
UserDir enabled
UserDir disabled root jro fish
À§ ¼³Á¤Àº disabled
¹®Àå¿¡ ¿°ÅÇÑ »ç¶÷À»
Á¦¿ÜÇÏ°í ¸ðµç »ç¿ëÀÚ¿¡°Ô À¥µð·ºÅ丮 ±â´ÉÀ» Çã¶ôÇÑ´Ù. ¶Ç,
´ÙÀ½°ú °°ÀÌ ¸î¸î »ç¿ëÀÚ¸¦ Á¦¿ÜÇÏ°í ±â´ÉÀ» Çã¶ôÇÏÁö ¾ÊÀ»
¼öµµ ÀÖ´Ù:
UserDir disabled
UserDir enabled rbowen krietz
UserDir
¹®¼¿¡ ÀÖ´Â ´Ù¸¥ ¿¹µéµµ Âü°íÇ϶ó.
»ç¿ëÀÚ¸¶´Ù cgi-bin µð·ºÅ丮¸¦ ºÎ¿©ÇÏ·Á¸é <Directory>
Áö½Ã¾î¸¦
»ç¿ëÇÏ¿© »ç¿ëÀÚ È¨µð·ºÅ丮ÀÇ Æ¯Á¤ ÇÏÀ§µð·ºÅ丮¸¦ cgi °¡´ÉÇÏ°Ô
¸¸µç´Ù.
<Directory /home/*/public_html/cgi-bin/>
Options ExecCGI
SetHandler cgi-script
</Directory>
UserDir
ÀÌ public_html
À̶ó°í
°¡Á¤Çϸé, ´ÙÀ½°ú °°ÀÌ ±× ¾È¿¡ ÀÖ´Â cgi ÇÁ·Î±×·¥
example.cgi
¸¦ ½ÇÇàÇÒ ¼ö ÀÖ´Ù.
http://example.com/~rbowen/cgi-bin/example.cgi
»ç¿ëÀÚ°¡ ÀÚ½ÅÀÇ À¥°ø°£¿¡ ´ëÇÑ À¥¼¹ö ¼³Á¤À» ¼öÁ¤ÇÏ·Á¸é,
.htaccess
ÆÄÀÏÀ» »ç¿ëÇÒ ¼ö ÀÖ¾î¾ß ÇÑ´Ù. AllowOverride
¸¦ »ç¿ëÀÚ°¡ ¼öÁ¤ÇÒ
¼ö ÀÖ´Â Áö½Ã¾î¿¡ ÀûÇÕÇÑ °ªÀ¸·Î ¼³Á¤Ç϶ó. ¾î¶»°Ô µ¿ÀÛÇÏ´ÂÁö¿¡
´ëÇÑ ÀÚ¼¼ÇÑ Á´º¸´Â .htaccess
ÅõÅ丮¾óÀ» Âü°íÇ϶ó.