DocumentRoot要访问的文件根目录,下面的是windows下的
DocumentRoot "F:/Program Files (x86)/Apache/htdocs"
Directory和上面的一致
<Directory "F:/Program Files (x86)/Apache/htdocs">
# # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # Options FileInfo AuthConfig Limit # AllowOverride None # # Controls who can get stuff from this server. # Order allow,deny Allow from all</Directory>DirectoryIndex(目录索引,也就是在仅指定目录的情况下,默认显示的文件名,就是首页)可以添加很多,系统会根据从左至右的顺序来优先显示,以单个半角空格隔开,比如有些网站的首页是index.htm,就在光标那里加上“index.htm ”文件名是任意的,不一定非得“index.html”,比如“test.php”等,都可以。
<IfModule dir_module>
DirectoryIndex index.html</IfModule>