Caution!

This tutorial is for those who can administrate UNIX system. Use this at your own risk.

Prerequisite

IP Addr  :192.168.0.2
Username :matsu
Directory:/Users/matsu/dav/
Realm    :DAV

[Step0] Check Apache Web server

mini:~ matsu$ httpd -v
Server version: Apache/2.2.24 (Unix)
Server built:   Aug 24 2013 21:10:43

 Go to next step if the result is almost the same as above.

[Step1] Login as root

mini:~ matsu$ su
Password:
bash-3.2# 

 Go to next step if there's no error.

[Step2] Make backup copies

bash-3.2# cp -p /private/etc/apache2/httpd.conf /private/etc/apache2/httpd.conf.org
bash-3.2# chmod a-w /private/etc/apache2/httpd.conf.org
bash-3.2# cp -p /private/etc/apache2/extra/httpd-dav.conf /private/etc/apache2/extra/httpd-dav.conf.org
bash-3.2# chmod a-w /private/etc/apache2/extra/httpd-dav.conf.org

 Go to next step if there's no error.

[Step3] Activate WebDAV

bash-3.2# vi /private/etc/apache2/httpd.conf

################################################################################
...
# Distributed authoring and versioning (WebDAV)
#Include /private/etc/apache2/extra/httpd-dav.conf

Include /private/etc/apache2/extra/httpd-dav.conf
...
################################################################################

 Go to next step if the modification is successfully completed and `apachectl configtest` returns "Syntax OK".

[Step4] Setup WebDAV

bash-3.2# vi /private/etc/apache2/extra/httpd-dav.conf

httpd-dav.conf example

 Go to next step if the modification is successfully completed and `apachectl configtest` returns "Syntax OK".

[Step5] Create password file for digest authentication

bash-3.2# htdigest -c "/usr/user.passwd" DAV matsu
Adding password for matsu in realm DAV.
New password: 
Re-type new password: 
bash-3.2# 

 Go to next step if the result is almost the same as above.

[Step6] Logout(root)

bash-3.2# exit
exit
mini:~ matsu$ 

[Step7] Setup dav directory

Give read permissions to all files after maintaining files under the /Users/matsu/dav directory.
mini:~ chmod -R a+r /Users/matsu/dav

[Step8] Restart Apache Web server

mini:~ sudo apachectl restart