WebDAV stands for "Web-based Distributed Authoring and Versioning." It enables you to edit and manage files on a Web server remotely and in collaboration with others. You can read more about it at http://www.webdav.org. MacOS X supports WebDAV as a flavor of shared volume that you can mount through the Finder's Go -> Connect To menu command. Microsoft Windows also supports it as web folders. If you're using Windows XP, open My Computer, then choose Map Network Drive from the Tools menu.
We will use mod_dav with mod_encoding on apache to enable it on your mac OS X client.
Now it's time to open your Terminal.
[Editor's note: I have not tested this hint myself, and if it fails, it's possible you'll wind up with a non-functional Apache, so proceed at your own discretion. We ran a hint on setting up WebDAV a while back, but this one is much more thorough...]
1) Install mod_dav (http://www.webdav.org/mod_dav/)
Type the following in the Terminal:
% curl -O http://www.webdav.org/mod_dav/mod_dav-1.0.3-1.3.6.tar.gz2) Install libconv (http://www.gnu.org/software/libiconv)
% tar xvzf mod_dav-1.0.3-1.3.6.tar.gz
% pushd mod_dav-1.0.3-1.3.6/
% ./configure --with-apxs=/usr/sbin/apxs
% make
% sudo make install
% popd
% curl -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.8.tar.gz3) Install mod_encoding (http://webdav.todo.gr.jp/download/)
% tar xvzf libiconv-1.8.tar.gz
% pushd libiconv-1.8/
% ./configure --mandir=/usr/local/share/man
% make
% sudo make install
% popd
% curl -0 http://webdav.todo.gr.jp/download/mod_encoding-20020611a.tar.gz4) Enable WebDAV in the Apache Config File
% tar xvzf mod_encoding-20020611a.tar.gz
% pushd mod_encoding-20020611a/
% ./configure --with-apxs=/usr/sbin/apxs
% make
% sudo make install
% popd
% sudo vi /private/etc/httpd/httpd.confAdd or uncomment in the beginning of httpd.conf (where you see LoadModules directives):
LoadModule headers_module libexec/mod_headers.soZoom down to the end of the file and add this text:
LoadModule encoding_module libexec/mod_encoding.so
AddModule mod_headers.c
AddModule mod_encoding.c
#Save httpd.conf and exit.
# Set DAVLockDB for webdav support
#
DAVLockDB /private/var/run/davlocks/DAVLockDB
#
#
Fix header for webdav#
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "Microsoft-WebDAV-MiniRedir/5.1.2600" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS" redirect-carefully
<IfModule mod_headers.c>
Header add MS-Author-Via "DAV"
</IfModule>
<IfModule mod_encoding.c>
EncodingEngine on
NormalizeUsername on
</IfModule>
% sudo mkdir /Library/WebServer/Documents/davOpen httpd.conf again and zoom down to the end of the file and add this text:
% sudo chmod -R 775 /Library/WebServer/Documents/dav
Alias /dav /Library/WebServer/Documentsd/avSave httpd.conf and exit.
<Location /dav>
DAV On
AuthType Basic
AuthName "WebDAV Restricted"
AuthUserFile /private/etc/httpd/passwords/webdav.access
require valid-user
Order allow,deny
Allow from all
</Location>
% sudo mkdir /private/etc/httpd/passwordsThen create a user named davuser1:
% sudo htpasswd -c /private/etc/httpd/passwords/webdav.accessProvide a password when prompted.
% sudo apachectl gracefulAnd that's all, now you have webdav enabled. Open your webdav folder with this url: http://your_ip_number/dav
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021114063433862