解释LINUX以下的参数:DocumentRoot和DirectoryIndex的作用

1.DocumentRoot

DocumentRoot指定apache服务器网页(文档)根目录

DocumentRoot "/home/iflow/apache2/htdocs"
它的作用是指定网站文件在服务器存放路径。

2..DirectoryIndex

DirectoryIndex是在只指定目录的情况下默认显示的文件名

DirectoryIndex home.html index.html index.html.var index.shtml
作用是我打开网站时,输入 域名或者url+目录,如果目录下存在DirectoryIndex设置的文件名的文档,home.html index.html 等,默认就打开这样的文件。没有这些文档的话,打开存在的目录会显示Forbidden错误

posted on 2019-09-20 17:00  步留痕  阅读(1467)  评论(0编辑  收藏  举报

导航