选项指令禁止的目录索引 [英] Directory index forbidden by Options directive

查看:30
本文介绍了选项指令禁止的目录索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 codeigniter 使用 dompdf 插件:http://codeigniter.com/wiki/PDF_generation_using_dompdf/

从表单生成pdf.这适用于本地主机,但在实时服务器上我在错误日志中得到了这个:

Options 指令禁止的目录索引:/var/www/vhosts/domain.co.uk/httpdocs/mm/userdata/account1/invoices/

知道这是什么意思吗?我搜索了答案,发现了一些建议编辑 httpd.conf 的答案,但我无权访问.

我还尝试将一个空白的 index.html 文件添加到根目录和文档目录中(正如其他地方所建议的,但无济于事).

非常感谢任何帮助.

谢谢!

解决方案

该目录下的主 httpd.conf.htaccess 文件或附近的父目录可能包括:

Options -Indexes

如果您在 .htaccess 中没有访问权限并且想要列出 &浏览目录内容,没有默认的index.html、index.php等.如果目录不应该有默认文件并且你没有启用Indexes,你只能直接定位其中内容的文件名.

Indexes 选项通常在许多 Apache 安装中被默认禁用.

完整的细节可以在关于Options的Apache核心文档中找到

I'm using the dompdf plugin for codeigniter: http://codeigniter.com/wiki/PDF_generation_using_dompdf/

to generate pdfs from a form. This works on localhost, but on the live server I get this in the error log:

Directory index forbidden by Options directive: /var/www/vhosts/domain.co.uk/httpdocs/mm/userdata/account1/invoices/

Any idea what this means? I've searched for answers, and found a few that suggest editing the httpd.conf, however I don't have access to this.

I've also tried adding a blank index.html file to the root and document directory (as also suggested elsewhere, but to no avail).

Any help greatly appreciated.

Thanks!

解决方案

Either the main httpd.conf or the .htaccess file in this directory or a nearby parent directory probably includes:

Options -Indexes

Your host may have to set it to +Indexes if you don't have access in .htaccess and want to list & browse the directory contents, absent a default index.html, index.php, etc. If the directory should not have a default file and you don't enable Indexes, you may only directly target the filenames of contents within it.

The Indexes option is commonly disabled by default on many Apache installations.

Full details are available in the Apache core documentation on Options

这篇关于选项指令禁止的目录索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆