关于Linux的Web服务器的index.html和default.html

来源:百度知道 编辑:UC知道 时间:2024/06/02 21:06:58
这个系统的Web只认index.html有什么办法让它也认default.html吗?
我做了2个Web,文件名都是default.html重启服务登陆不认,把名字改回index.html就认了,有什么办法能解决这个问题吗?

定位 httpd.conf到

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>

将 default.html添加到 DirectoryIndex一行的后面

在/etc/httpd/conf/httpd.conf里面改
你也可以看man httpd.conf里面有说明