/ BLOG / iCalendar server, for the lazy

I’ve been raving on about coding a caldav module for Apache for sodding yonks, but not actually finished it yet. This evening this was a problem as I’d made a cock up thanks to the fact that the work MBP and my desktop weren’t anywhere near similiar, in terms of personal calendaring. I don’t like web-based calendars, purely because they suck balls, and when I need to look at it I’m not near a (cheap) web connection

On this basis I decided to suck it up and setup an Apache HTTPD vhost with mod_dav_fs. What this does it allow you to write to the underlying file system. Since ics files are completely self-contained, this should Just Work™.

  1. Ensure that mod_dav and mod_dav_fs are loaded by your Apache HTTPD installation.
  2. Setup the DNS, virtualhost, etc. as you would for a normal website. For example:
    <VirtualHost *:80>
        DocumentRoot /path/to/docroot
        ServerName hostname.tld
  3. Add
    DAVLockDB /path/to/lockfile
    to this hosts', stanza and ensure that this file is writeable by the webserver.
  4. Also add the following:
    <Location />
        Dav On
        AuthType Basic
        AuthName "Password Required"
        AuthUserFile /path/to/.htpasswd
        Require valid-user
  5. Add your users to the .htpasswd file in the previous step. If you want to be adventurous look into mod_authn_db instead.
  6. Ensure that your chosen directory is writeable by the webserver, and restart it.

Personally I’d suggest SSL'ing the website, and ensuring that you have a decent username and password. Whilst not perfect, it should be suitable. In your iCal client you simply need to include the username and password in the URL of the remote calendar (in the standard http://username:password@hostname.tld format), and you should be well away!

My only fear is that this detains me from actually finishing the caldav module.