[email@redhat71 /tmp]$ more /etc/httpd/conf.d/welcome.conf
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
[email@redhat71 /tmp]$ more /etc/httpd/conf.d/welcome.conf
#
# This configuration file enables the default "Welcome"
# page if there is no default index page present for
# the root URL. To disable the Welcome page, comment
# out all the lines below.
#
<LocationMatch "^/+$">
Options -Indexes
ErrorDocument 403 /error/noindex.html
</LocationMatch>
如果你没有放index.html,那么就必须修改你的httpd.conf里的:
...
#
# DirectoryIndex: Name of the file or files to use as a pre-written HTML
# directory index. Separate multiple entries with spaces.
#
《IfModule mod_dir.c》
DirectoryIndex index.html
《/IfModule》
...
为其它样式,否则它就会自动去找里面的index.html(由于单引号不能显示,双引号你就当是单引号吧)。顺便说一句,不要万事和Windows比较,因为微软采用的许多东西是非标的,所以漏洞百出。