/ 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™.
- Ensure that mod_dav and mod_dav_fs are loaded by your Apache HTTPD installation.
- Setup the DNS, virtualhost, etc. as you would for a normal website. For example:
<VirtualHost *:80> DocumentRoot /path/to/docroot ServerName hostname.tld </VirtualHost>
to this hosts', stanza and ensure that this file is writeable by the webserver.
- Also add the following:
<Location /> Dav On AuthType Basic AuthName "Password Required" AuthUserFile /path/to/.htpasswd Require valid-user </Location>
- Add your users to the .htpasswd file in the previous step. If you want to be adventurous look into mod_authn_db instead.
- 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:email@example.com format), and you should be well away!
My only fear is that this detains me from actually finishing the caldav module.