首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >不添加索引解决不匹配的DirectoryIndex问题

不添加索引解决不匹配的DirectoryIndex问题
EN

Stack Overflow用户
提问于 2020-01-02 23:00:38
回答 1查看 5K关注 0票数 0

我想解决或禁用此错误:

代码语言:javascript
复制
[Thu Jan 02 23:48:06.382888 2020] [autoindex:error] [pid 17460:tid 140351947863808] [client 92.36.xxx.xxx:49018] AH01276: Cannot serve directory /home/user/public_html/kodi/repository/: No matching DirectoryIndex (index.php,index.html.var,index.htm,index.html,index.shtml,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.phtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html) found, and server-generated directory index forbidden by Options directive

文件夹存储库没有任何索引或.htacess文件。我需要这个没有索引文件的文件夹.

我有Apache2.4,这个配置:

代码语言:javascript
复制
<Directory "/home/user/public_html/kodi/">
        Require all granted
</Directory>

<Directory "/home/user/public_html/kodi/repository/">
        Require all granted
    </Directory>

如何解决这个错误?

EN

回答 1

Stack Overflow用户

发布于 2020-01-03 18:21:09

我解决了这个错误。我删除了上面的代码,并输入以下内容:

代码语言:javascript
复制
<Directory "/home/user/public_html/kodi">
  Options Indexes FollowSymLinks
  AllowOverride None
  Require all granted
</Directory>

还删除了科迪文件夹中的.htaccess。并使default.php文件为空,现在所有的工作都很棒!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59571111

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档