Plon 4.0.4 和 WebDAV

发布于 2024-10-24 20:02:24 字数 612 浏览 3 评论 0原文

我一直在查看

http://plone.org/documentation/kb/webdav http://plone.org/documentation/kb/more-webdav

我能够使用 cadaver 连接到端口 1980(在 FreeBSD 上)。

我使用 Apache(ProxyPass 和 ProxyPassReverse)对 Plone 进行了简单的设置。

到目前为止,一切都很好。现在我希望 Apache 将 WebDAV 请求代理(或重写)到 WebDAV 服务器。当使用 Netdrive(或在文件资源管理器中映射驱动器的其他实用程序)时,用户只能通过 WebDAV 查看其个人“成员文件夹”,而不是根文件夹或其他成员文件夹。

如果有人可以指导我一个简单的教程,显示 Apache VirtualHost 中的重写规则(不是我理解的 ProxyPass),我会很高兴。

谢谢。 尼古拉·G.

Ive been looking at

http://plone.org/documentation/kb/webdav
http://plone.org/documentation/kb/more-webdav

and Im able to connect to port 1980 with cadaver (on FreeBSD).

I have a simple setup of Plone behind Apache using (ProxyPass and ProxyPassReverse).

So far so good. Now I would like Apache to proxy (or rewrite) WebDAV requests to the
WebDAV server. Users must only see their personal "member folder" with WebDAV - not root or other member folders, when using Netdrive (or other util to map a drive in the file explorer).

I would be happy if someone could direct me to a simple tutorial showing the rewrite rules (not ProxyPass as I understand) in Apache VirtualHost.

Thanks.
Nikolaj G.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红玫瑰 2024-10-31 20:02:24

ProxyPass 可以工作。我有一些网站使用 ProxyPass,其他网站使用 RewriteRule。 Zope VirtualHostMonster 下的文档是另一个好地方。

重写就像这样简单:

<VirtualHost *:80>
    ServerName  webdav.example.ca
    ServerAlias somethingelse
    ServerAdmin [email protected]

因此,我假设您将为 DAV 服务器指定一个特定的主机名 - 在本例中为 webdav.example.ca。

    RewriteLogLevel 0
    RewriteEngine On

在打开 Rewrite 之前,您无法使用它:-)

    RewriteRule ^(.*) http://localhost:1980/VirtualHostBase/http/webdav.example.ca:80/Plone/Members/VirtualHostRoot$1 [L,P]

VirtuaLHostBase 之前的部分是 DAV 服务器所在的实际主机/端口。下一部分http/webdav.example.ca:80 描述您希望用户使用的协议//:server:portPlone 将是您的 Plone 站点名称。 $1 与正则表达式 (.*) 匹配。

</VirtualHost>

测试它就像使用 DAV 服务器上的尸体一样简单。首先确保您可以访问:

http://localhost:1980/Plone/Members/username

然后:

http://localhost:1980/VirtualHostBase/http/webdav.example.ca:80/Plone/Members/VirtualHostRoot/username

最后:

http://webdav.example.ca:80/username

现在,这并不能阻止用户尝试附加到其他人的文件夹,但 Zope 安全性可以。这有点像先有鸡还是先有蛋的情况,服务器在您使用用户名之前并不知道用户名。

ProxyPass can work. I have some sites using ProxyPass, others using RewriteRule. The documentation under your Zope VirtualHostMonster is another good place.

The rewriting is as simple as this:

<VirtualHost *:80>
    ServerName  webdav.example.ca
    ServerAlias somethingelse
    ServerAdmin [email protected]

So, I'm assuming you are going to have a specific hostname for the DAV server - in this case webdav.example.ca.

    RewriteLogLevel 0
    RewriteEngine On

You can't use Rewrite until you turn it on :-)

    RewriteRule ^(.*) http://localhost:1980/VirtualHostBase/http/webdav.example.ca:80/Plone/Members/VirtualHostRoot$1 [L,P]

The part before VirtuaLHostBase is the actual host/port your DAV server is on. The next part http/webdav.example.ca:80 describes the protocol//:server:port you want the users to use. Plone would be your Plone Site name. $1 matches the regular expression (.*).

</VirtualHost>

Testing it is as easy as using cadaver from your DAV server. First make sure that you can access:

http://localhost:1980/Plone/Members/username

Then:

http://localhost:1980/VirtualHostBase/http/webdav.example.ca:80/Plone/Members/VirtualHostRoot/username

Finally:

http://webdav.example.ca:80/username

Now, this doesn't prevent a user from trying to attach to somebody else's folder, but Zope security does. There's a bit of a chicken and egg situation in that the server doesn't know the username until after you have already used this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文