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

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

问题描述

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

从表单生成pdf。这在localhost上工作,但在活动服务器上,我在错误日志中得到这个:

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

任何想法这是什么意思?我搜索的答案,并发现一些建议编辑httpd.conf,但我没有访问这个。



我也试过添加一个空白的index.html文件到根目录和文档目录(也在别处建议,但没有效果)。



任何帮助非常感激。



谢谢!

解决方案

httpd.conf 或此目录或附近父目录中的 .htaccess 文件可能包括:

 选项-Indexes 

您的主机可能必须将其设置为<$如果您在 .htaccess 中没有访问权限,并希望列出&浏览目录内容,缺少默认的 index.html,index.php 等。如果目录不应该有默认文件,并且不启用 Indexes ,您只能直接定位其中的内容的文件名。



索引选项在许多Apache安装上默认是禁用的。



完整的详细信息可以在 选项 上的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

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

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