Davical Configuration

2013-07-05 01:19 by Thorben Bürgel

How to configure davical on a debian server

The calendar server Davical is a great tool for managing appointments and tasks. It implements the CalDAV protocol and can be connected with many clients. But after updates, I had often trouble to get it working again. So the last time again. Thus, I describe here how I fixed my configuration at last.
If davical and postgresql are installed and the database scheme with the user permissions is setup and even the apache virtual hosts are properly configured, the davical server should be running fine.... it should!
But in my case something was going wrong. I got a blank page and the errorlog says that authentication for the database access is missing. Though I configured everything step by step as mentioned in the tutorials for debian. Nevertheless I could access the setup.php that also showed up that davical couldn't connect to it's database. After a couple of hours serching the web and chatting on the official davical irc channel I found a solution.

The davical config.php was wrong. It looked like this:

<?php
  $c->admin_email = 'admin@example.net';
  $c->system_name = "DAViCal CalDAV Server";
  $c->enable_row_linking = true;
  $c->default_locale = 'en_US.UTF-8';

  $c->pg_connect[] = 'dbname=davical port=5432 user=davical_app host=localhost';

This caused problems with the parameter port and host. I think it tried to connect to the database from outside and not as a local user.
I also added a trailing '?>' to close the php-file.

The altered config looks like this:

<?php
  $c->admin_email = 'admin@example.net';
  $c->system_name = "DAViCal CalDAV Server";
  $c->enable_row_linking = true;
  $c->default_locale = 'en_US.UTF-8';

  $c->pg_connect[] = 'dbname=davical user=davical_app';

?>

Then I just reloaded and it worked like a charm. Problem solved :)

Go back