在新安装的Centos 6.3上
我从Ubuntu导入了一个虚拟主机的配置。
DocumentRoot /otherhome/test.cofares.net
ServerName test.cofares.net
<Directory "/otherhome/test.cofares.net">
allow from all
Options +Indexes
</Directory>
对http://test.cofares.net的请求在错误日志中出现以下错误
Directory index forbidden by Options directive: /otherhome/test.cofares.net/
用于子目录http://test.cofares.net/test的目录索引正常
有什么建议吗?
同样的配置也适用于Ubuntu Server 12.04。
2条答案
按热度按时间xytpbqjk1#
试试这个。并且确保在应用以下命令后重新启动Apache:
也许可以用
Satisfy Any
来代替:**EDIT:**那些看起来不起作用吗?那就试试这个。注意我正在设置整个
<VirtualHost>
指令,并从<Directory>
指令中删除了引号:kkih6yb82#
经过一点挖掘,我注意到这是一个全局规则(在conf.d/welcome.conf中),它阻止对任何虚拟服务器的/目录进行索引
通过删除它现在是确定的
这是必须改变的规则