- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的 apache 配置中,我有一个虚拟主机配置如下:
Alias /mediamanager /storage/files/mediamanager
<Directory /storage/files/mediamanager>
DirectoryIndex /mediaManagerIndex.php
DAV On
# ... And some authentication directives ... #
</Directory>
这个想法是,某人可以通过 WebDAV 客户端和简单的 Web 浏览器访问文件,在这种情况下,PHP 脚本会生成一些漂亮的目录 View 。
这在 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 中同时工作(如果可能的话,无需更改源代码和重新编译)?
最佳答案
为了解决此问题,请禁用 WebDAV 站点的目录索引。
在您的sites-available/site.conf 文件中添加DirectoryIndex disabled
到<Directory>
声明,如下所示:
<Directory /path/to/my/webdav/dir>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
DirectoryIndex disabled
</Directory>
然后只需重新加载 Apache,您将不再遇到该问题:
sudo service apache2 reload
关于apache - 如何在 Apache 2.4 中使用 DAV 和 DirectoryIndex?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30916906/
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 9 年前。 Improve this
来自documentation我有这个: AliasMatch "^/projects/(.+)" "/var/www/domain.name/$1/public" 它应该只匹配像 ../projec
我有两个索引文件,我希望它们都在那里。我写了 DirectoryIndex index.php index.html在我的 .htaccess文件。这是我的 .htaccess 文件中唯一的一行,当我
我有一个 DirectoryIndex 页面,我想用 CSS 设计它的样式。而不是它看起来像这样: 有没有可能让它看起来不一样? 最佳答案 在 .he 访问文件中设置 header 模板,然后在其中包
我的.htaccess 文件包含以下指令 DirectoryIndex index.html index.php # redirect invalid requests and missing fi
我有一个包含一个域和一个子域的共享主机(用于移动和客户端)。每个域和子域都有不同的默认索引页面。托管公司告诉我将所有内容都放在我的 .htaccess 文件中,因为我无权访问 httpd.conf。
我的托管公司最近将我从 Apache 1 升级到 Apache 2,并且我已经开始看到我的 mod_rewrite 内容出现了一些完全不同的行为。 这是我的 .htaccess 文件: Directo
我在/geo 上安装了一个 Tomcat 应用程序,该应用程序有一个“index.jsp”,可以直接访问并且可以正常工作,但是当我尝试让 apache 将它用作目录索引条目时,它永远不会出现.比这更奇
如何同时使用 ProxyPass 和 DirectoryIndex? 我有以下规则: # Index DirectoryIndex index.html # Service Endpoint Prox
我在我的 .htaccess 文件中有以下重写,它从文件中删除了 .php 扩展名,例如将 so.com/question.php 转换为 so.com/question。 RewriteEngine
我确信这个问题已经被提出并得到了回答,但我没有找到解决方案。我有一个刚刚添加了 SSL 的虚拟主机,但它没有按预期工作。非 SSL 版本工作正常。以下是我在 httpd.conf 中得到的内容:
有没有办法在 Apache 下运行的 PHP 中获取 DirectoryIndex 的数组(或类似的东西)?例如,我希望能够检查特定目录中是否存在 DirectoryIndex 文件之一。这与 How
我们正在尝试设置本地开发 XAMPP 计算机(Apache2,在 Windows 8 上)。 除了一种特定类型的指令外,所有 mod_rewrite 指令都可以正常工作:我们尝试将对某些目录的请求重定
在我的 apache 配置中,我有一个虚拟主机配置如下: Alias /mediamanager /storage/files/mediamanager DirectoryIndex /medi
是否可以配置Resin提供静态文件,以便导航到例如http://localhost:8888/foo/bar/将提供文件 foo/bar/index.html (不执行重定向)?我在 Resin 文档
我试图在 docker 容器中使用 docker-compose 获取 php:apache 服务器以工作。但是在组合之后,我收到以下错误消息: [client 172.21.0.1:49230] A
我是一名优秀的程序员,十分优秀!