网站未加载 index.php 并显示文件夹索引

MD *_*QUI 3 lamp php apache2 webserver 18.04

文件夹图像索引

如您所见,它有 index.php 文件,但默认情况下并没有打开它。

我在/etc/apache2/mods-enabled/dir.conf 这里编辑的是文件

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>
Run Code Online (Sandbox Code Playgroud)

只有这个文件夹才会发生这种情况。所有其他文件夹都在那里打开 index.php 文件。

kar*_*rel 10

将 Index.php 文件的名称更改为 index.php。Linux 服务器区分大小写。index.html、index.htm 或 index.php 文件名必须全部小写才能找到。如果服务器没有找到索引,它会显示一个文件列表。