在我的Apache配置我已经配置这样的虚拟主机:如何在Apache 2.4中使用DAV和DirectoryIndex?
Alias /mediamanager /storage/files/mediamanager
<Directory /storage/files/mediamanager>
DirectoryIndex /mediaManagerIndex.php
DAV On
# ... And some authentication directives ... #
</Directory>
的想法是,有人可以通过WebDAV的客户端,也是一个简单的Web浏览器访问这些文件无论是在这种情况下,一些漂亮的目录视图由PHP脚本生成。
在Apache 2.2中效果很好,但最近我升级到了Apache 2.4,现在已经坏了。我高度怀疑自己患有this bug,这已经是2岁,并且没有修复视力。建议的解决方法:
<Limit PROPFIND>
DirectoryIndex never-encounterable-file-name.html
</Limit>
不适用于我。可能是因为我仍然想要一个目录索引。如果我删除我的DirectoryIndex
完全WebDAV的作品(没有index.html或类似的文件存在于此目录中),但当然我没有能力使用我的PHP文件作为目录索引。我试图在<Limit GET>
中指定我的DirectoryIndex,但这没有效果。
有没有什么办法让DAV和DirectoryIndex同时在Debian上的Apache 2.4上工作(如果有可能的话,无需更改源代码和重新编译)?
这是一种无法回答你的具体问题,但另一种可能解决这个问题的方法是丢弃apache的webdav处理程序并切换到像[saber/dav](http:// saber .io /) – Evert