Publish iCal calendars with local WebDAV server

Sep 12, '02 09:58:11AM

Contributed by: datasmid

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
Read the rest for the specific edits...

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.so 
AddModule mod_dav.c
Then somewhere in the global section add:
DAVLockDB /Library/WebServer/davlocks/DAVLockDB
I used this section to have a webdav folder managed by Apache:
<Directory "/Library/WebServer/Documents/dav">
DAV On
AuthName 'WebDAV'
AuthType Basic
AuthUserFile /etc/httpd/.htpasswd
AuthGroupFile /dev/null
<LimitExcept GET HEAD OPTIONS>
require valid-user
</LimitExcept>
</Directory>
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.

Good Luck!

[Editor's note: I have not yet tried this one out...]

Comments (90)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020912065811863