2014-06-12 29 views
0

在试图访问我们的服务器上的某个目录,我们得到以下403错误:阿帕奇403目录索引由Options指令禁止的,即使有index.html的

# /var/log/httpd/error_log 
Directory index forbidden by Options directive: <path-to-directory> 

这是用于配置文件目录(包含在httpd.conf中)。

# /etc/httpd/conf.d/<name-of-app>.conf 
<VirtualHost *:80> 
    DocumentRoot "<path-to-directory>" 
    ServerName <server-name> 

<Directory "<path-to-directory>"> 
    Options +Indexes 
    Order allow,deny 
    Allow from all 
    Require all granted 
</Directory> 

</VirtualHost> 

有问题的目录包含的index.html文件。

任何帮助将大大赞赏。

+0

服务器配置中是否有该目录的其他定义?你是否启用了'NameVirtualHost'? – arco444

+0

事实证明,我需要添加DirectoryIndex index.html,并解决了这个问题。 – nicohvi

回答

0

我通过将DirectoryIndex index.html添加到目录解决了这个问题。