[APACHE DOCUMENTATION]

Apache HTTP Server Version 1.3

Module mod_dir

ÀÌ ¸ðµâÀº mod_dir.c ÆÄÀÏ ¾È¿¡ Æ÷ÇԵǾî ÀÖÀ¸¸ç , ±âº»°ªÀ¸·Î ÄÄÆÄÀϵǾîÁ® ÀÖ´Ù. ÀÌ ¸ðµâÀÇ ¿ªÇÒÀº "trailing slash" ¸®´ÙÀÌ·ºÆ®±â´É°ú µð·ºÅ丮 ¸ñ·ÏÀ» º¸¿©ÁÖ´Â ±â´ÉÀ» Á¦°øÇÑ´Ù.

Summary

µð·ºÅ丮ÀÇ À妽º´Â µÎ°¡Áö Áß ÇϳªÀÇ ¼Ò½º·ÎºÎÅÍ ¿Ã ¼ö ÀÖ´Ù.

ÀÌ µÎ±â´ÉµéÀº µ¶¸³ÀûÀ̾, µð·ºÅ丮¸ñ·ÏÀ» º¸¿©ÁÖ´Â ±â´ÉÀÇ »ç¿ëÀ» ¸¶À½µ¥·Î ÇÒ ¼ö ÀÖ´Ù.

"trailing slash" ¸®´ÙÀÌ·ºÆ®´Â ¼­¹ö°¡ URL http://servername/foo/dirname (dirname .Àº µð·ºÅ丮) ¿¡ ´ëÇÑ ¿äûÀ» ¹Þ¾ÒÀ» ¶§ ¹ß»ý µÈ´Ù. µð·ºÅ丮µéÀº "trailing slash"¸¦ ¿äûÇϰí ,ÀÌ ¶§ mod_dir Àº http://servername/foo/dirname/ À¸·Î Redirect ¸¦ ¹ß»ý½ÃŲ´Ù.

Directives


DirectoryIndex

Syntax: DirectoryIndex local-url local-url ...
Default: DirectoryIndex index.html
Context: server config, virtual host, directory, .htaccess
Override: Indexes
Status: Base
Module: mod_dir

DirectoryIndex directive ´Â Ŭ¶óÀÌ¾ðÆ®°¡ µð·ºÅ丮ÀÇ À̸§ ³¡¿¡ / ¸¦ ºÙÇô¼­ µð·ºÅ丮ÀÇ ¸ñ·Ï(index)À» ¿äûÇÒ ¶§ , À̸¦ ã±â À§ÇÑ ¸®¼Ò½ºµéÀÇ ¸ñ·ÏÀ» ¼³Á¤ÇÑ´Ù. Local-url  Àº ¿äûµÈ µð·ºÅ丮¿¡ °ü·ÃµÈ ¼­¹ö³» ¹®¼­ÀÇ (%-encoded)URL ÀÌ´Ù. À̰ÍÀº º¸Åë µð·ºÅ丮¾È¿¡ ÀÖ´Â ÆÄÀÏÀÇ À̸§ÀÌ´Ù. ÁÖ¾îÁø °ÍÀÎ ´Ù¼öÀÇ URL µéÀ̸é , ÀÌ °æ¿ì ¼­¹ö´Â ¹ß°ßµÈ ù ¹øÂ°ÀÇ °ÍÀ» ¸®ÅÏÇÒ °ÍÀÌ´Ù. ¸¸¾à ¸®¼Ò´Â³»¿¡ ¾Æ¹« °ÍµµÁ¸ÀçÇÏÁö ¾Ê°í Indexes ¿É¼ÇÀ» ¼³Á¤µÇ¾î ÀÖÀ¸¸é , ¼­¹ö´Â ÀÚ½ÅÀÇ µð·ºÅ丮 ¸ñ·ÏÀ» »ý¼ºÇÏ¿© º¸¿© ÁÙ °ÍÀÌ´Ù.

Example:

DirectoryIndex index.html
then a request for http://myserver/docs/ ÀÇ ¿äû¿¡ ´ëÇØ http://myserver/docs/index.html ¸¦ µ¹·Á ÁØ´Ù(ÀÌ ÆÄÀÏÀÌ Á¸ÀçÇÒ °æ¿ì). °Å³ª µð·ºÅ丮 ¸ñ·ÏÀ» º¸¿©ÁØ´Ù.(index.html ÆÄÀÏÀÌ ¾øÀ» °æ¿ì)

¿©±â¼­ ÁöÁ¤ÇÒ ¹®¼­´Â ²À µð·ºÅ丮 ³»¿¡ ÀÖ¾î¾ß ÇÒ ÇÊ¿ä´Â ¾ø´Ù.;

DirectoryIndex index.html index.txt /cgi-bin/index.pl
ÀÌ ¿¹¿¡¼­ index.html À̳ª index.txt ÆÄÀÏÀÌ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì¿¡´Â CGI script /cgi-bin/index.pl ¸¦ ½ÇÇàÇÏ°Ô µÈ´Ù.



Apache HTTP Server Version 1.3

Index Home