在更改dir.conf文件中的文件首选项后,apache服务器提供index.html而不是index.php



我更改了dir.conf文件中的文件首选项:

$sudo nano /etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm
</IfModule>

这意味着index.php将获得第一优先权,对吧?

/var/www/html中,我有两个文件,即index.html和index.php。但是当我在浏览器中访问我的ip_address时,提供的是index.html而不是index.php。我是不是错过了什么?

更改dir.conf文件:

<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

最新更新