解释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错误

版权声明:本文为bulh原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/bulh/articles/11558269.html