Set Up WebDAV for iCal Sharing on ubuntu 8.04

Enabling WebDAV for iCal publishing/sharing is fairly straightforward:

0. Install apache2 (if it's not already installed):

bash
1
sudo apt-get install apache2

1. Create a WebDAV directory in your DocumentRoot with the proper permissions:

1
2
mkdir -p /var/www/webdav
chmod -R 777 /var/www/webdav

2. Edit Apache2's dav_fs.conf file:

1
2
cd /etc/apache2/mods-available
sudo vi dav_fs.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
DAVLockDB /var/lock/apache2/DAVLock

<Directory "/var/www/webdav">
    DAV On
    DAVMinTimeout 600
    DAVDepthInfinity On

    AllowOverride AuthConfig
    AuthName "DAV Restricted"
    AuthType Basic
    AuthUserFile /etc/apache2/.htaccess

    Require valid-user
</Directory>

3. Create symlinks to the proper DAV module files: (Some of these will already exist. Leave them alone.)

1
2
3
4
cd ../mods-enabled
sudo ln -s ../mods-available/dav.load
sudo ln -s ../mods-available/dav_fs.conf
sudo ln -s ../mods-available/dav_fs.load

4. Create the 'AuthUserFile' indicated in step 2:

1
sudo htpasswd -m -c /etc/httpd/.htaccess webcal

5. Restart apache:

1
sudo /etc/init.d/apache2 restart

6. Publish your iCal!

Your url for publishing should now look like http://mywebhost/webdav/iCal/. Enjoy!

Based on a guide for Fedora at millan.info.

May 31st, 2008

Comments