To publish your iCal Calendar with the bundled OS X Apache web server, edit Apache’s configuration file in /etc/httpd. You must be root, so I expect you know vi and the workings of this file in general.
% sudo vi /etc/httpd/htttpd.conf
In the Shared Library section, where modules are loaded, add these two lines in the same ordering in their repective sections:
LoadModule dav_module libexec/httpd/libdav.soAddModule mod_dav.c
Then somewhere in the global section add:
I used this section to have a webdav folder managed by Apache:
<Directory "/Library/WebServer/Documents/dav"> DAV On
<LimitExcept GET HEAD OPTIONS>
I want this folder protected (somewhat) by a password. To generate the password file
with MD5 passwords (not that old crypt!), please use the -m flag. The file is text. Note that http is vulnarable to sniffing attacks, so someone on your network can get at your password.
% htpasswd -m -c /etc/httpd/.htpasswd user New password: not_safe
Re-type new password: not_safe
Adding password for user user
Then set up the folder with permissions.
% cd /Library/WebServer/ % mkdir davlocks
% chown www:www davlocks
% cd Documents
% mkdir dav
% chown www:www dav
In iCal, choose Publish Calendar and specify http://localhost/dav/iCal. Do not FTP stuff into the dav folder; webdav uses its own locking, don’t confuse it.