开发者

Plone 4.0.4 and WebDAV

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 Fre开发者_运维知识库eBSD).

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.


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@example.ca

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜