我试图在运行OS X 10.6.6的Mac上设置一个webdav服务器。 这是我的/private/etc/apache2/extra/httpd-dav.conf文件:
Alias /webdav "/Library/WebServer/WebDAV" <Directory "/Library/WebServer/WebDAV"> Order Allow,Deny Allow from all Dav On AuthType Digest AuthName WebDAV-Realm AuthUserFile "/usr/var/webdav.passwd" </Directory>
从Finder中,我可以使用connect命令连接到http:// localhost / webdav / ,它询问我的密码,但是我总是得到一个连接失败的错误。
如果我使用你的configuration,我在我的错误日志( /var/log/apache2/error_log )中收到以下错误消息:
[Mon Jan 24 20:18:54 2011] [error] [client ::1] The lock database could not be opened, preventing access to the various lock properties for the PROPFIND. [500, #0] [Mon Jan 24 20:18:54 2011] [error] [client ::1] A lock database was not specified with the DAVLockDB directive. One must be specified to use the locking functionality. [500, #401]
这会导致Finder返回“连接失败”消息。 如果您看一下Apple提供的示例httpd-dav.conf ,您将看到:
DavLockDB "/usr/var/DavLock"
所以你在自己的configuration中需要这样的东西。 添加适当的DavLockDB条目到我的configuration文件后,它没有任何问题。 关于mod_dav_fs文档可以在这里find。
注意:您可能还需要将一个require valid-user指令添加到您的目录configuration,以防止未经授权的访问该目录。