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.

link|improve this question
We could use more detail. What does is the exact error, what do your logs say? – Sam Jan 24 '11 at 23:32
And are you able to successfully load that URL in a browser? – larsks Jan 25 '11 at 0:18
feedback

1 Answer

up vote 1 down vote accepted

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.