Skip to content

Publishing iCal To WebDav

Now that I’ve moved almost exclusively over to the Powerbook for my computing needs, I thought I’d start using iCal and see if I can get a little more organized. Of course Andrea wants to use iCal as well and we want to share our calendars. To do that you either need a .Mac account or you need to role your own webdav server. Since I happen to have several boxes around running Debian, I thought I’d go with the latter option.

The first thing you have to do is turn on webdav. The instructions here worked great. These are Debian/apache2 specific, but the instructions are pretty straight forward, so I’m sure you can figure them out for another Linux distribution or apache.

It basically comes down to this:

1) Install the apache2 webdav module

> a2enmod dav_fs
> a2enmod dav

2) Set up authentication (in this case digest auth)

> a2enmod auth_digest
> htdigest -c /path/to/digest-password webdav myuser

3) Configure webdav in your virtual host file by adding the following:

Alias /webdav /path/to/webdavdir

<Location /webdav>
    DAV On
    AuthType Digest
    AuthName “webdav”
    AuthDigestFile /path/to/digest-password
    Require valid-user
</Location>

Don’t forget to create the webdav directory and make it owned by www-data. Then restart apache2 and you should be good to go. You can use a browser to go to http://yourvirtualhost/webdav to make sure everything is ok.

From there publishing your iCal calendars is pretty easy. Go into iCal and select Calendar->Publish. Publishing defaults to .Mac so you’ll want to select “a Private Server” from the dropdown. Then enter your server info, including username and password and you are done.