美文网首页
修改Apache服务器的默认首页

修改Apache服务器的默认首页

作者: 程序猿阿乐 | 来源:发表于2020-04-08 09:07 被阅读0次

访问Apache服务器时,默认是直接访问htdocs目录下的index.html,这是在conf/httpd.conf中配置的。

查到conf/httpd.conf中的<IfModule dir_module>,其默认内容如下:

<IfModule dir_module>
    DirectoryIndex index.php index.html
</IfModule>

访问Apache服务器时,它默认的从这里找文件,先找index.php,再找index.html,找不到时报错说没有访问权限。根据这个规则,只需要将要显示的文件设置在第一位就好啦。

转载自
https://www.php.cn/apache/441264.html

相关文章

网友评论

      本文标题:修改Apache服务器的默认首页

      本文链接:https://www.haomeiwen.com/subject/cblzphtx.html