【发布时间】:2014-06-12 08:58:18
【问题描述】:
在尝试访问我们服务器上的某个目录时,我们收到以下 403 错误:
# /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 文件。
我们将非常感谢提供任何帮助。
【问题讨论】:
-
服务器配置中该目录是否还有其他定义?您是否启用了
NameVirtualHost? -
原来我需要添加DirectoryIndex index.html,这样就解决了问题。
标签: apache centos http-status-code-403