0

I'm trying to set up a webdav server on my Mac running OS X 10.6.6. Here's my /private/etc/apache2/extra/httpd-dav.conf file:

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>

From the Finder, I can use the connect command to connect to http://localhost/webdav/, which asks for my password, but I always get a connection failed error.

Noah
  • 103
  • 1
  • 3

1 Answers1

1

If I use your configuration, I get the following error message in my error logs (/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]

This causes the Finder to return a "connection failed" message. If you look at the example httpd-dav.conf provided by Apple, you'll see:

DavLockDB "/usr/var/DavLock"

So you need something like that in your own configuration. After adding the appropriate DavLockDB entry to my config file, it worked without any problems. Documentation on mod_dav_fs can be found here.

NB: You may also want to add a require valid-user directive to your directory configuration to prevent unauthorized access to the directory.

larsks
  • 43,623
  • 14
  • 121
  • 180