In use, I got quite a few devices - three laptops alone, and a computer at work and a smartphone. At some point, I realized that the address book was not convenient to store in the scatter like that, and I would also like to keep the calendar somehow uniform. Synchronizing such a number of devices with each other is somehow very inconvenient. Here it is time to figure out how to get out of it all. I decided to look towards the caldav and carddav servers.
Requirements for them were as simple as possible for me - take accounts from either LDAP or IMAP and the availability of a web interface for viewing the calendar and address book.
Three such implementations came under consideration:
1. Baikal - did not fit. I did not like the fact that it was necessary to maintain a separate database of accounts.
2. Radicale is not a bad thing, but the webmord could not be screwed to it, although the site says that CalDavZap works with it. Maybe I didn’t really try ... And I somehow didn’t like the documentation for it. Also did not fit.
3. Davical - But this is earned. What exactly is the way I wanted. Therefore, we consider its installation and configuration:
Install and configure Davical
Ubuntu ServerPack 12.04 was used as a server distribution.
Install the necessary set of software packages:
# apt-get install install postgresql apache2 php5 php5-pgsqll davical php5-curl php5-imap')
After installation, you need to make a small postrgesql setting. Open
/etc/postgresql/9.1/main/pg_hba.confComment the line
local all postgres peerAnd add the other two
local davical davical_app trust
local davical davical_dba trustThen restart postgresql
# service postgresql restartNext you need to run a script that will create the desired database.
# su postgres -c /usr/share/davical/dba/create-database.shThe output will be something like this:
Supported locales updated.
Updated view: dav_principal.sql applied.
CalDAV functions updated.
RRULE functions updated.
Database permissions updated.
NOTE
====
* You will need to edit the PostgreSQL pg_hba.conf to allow the
'davical_dba' database user access to the 'davical' database.
* You will need to edit the PostgreSQL pg_hba.conf to allow the
'davical_app' database user access to the 'davical' database.
* The password for the 'admin' user has been set to 'co / e9Ap3'
Thanks for trying DAViCal! Check in / usr / share / doc / davical / examples / for
some configuration examples. For help, visit #davical on irc.oftc.net.We look at him carefully. There will be admin's login and password in the davical web interface
Create a configuration file
/etc/davical/config.php<? php
$ c-> authenticate_hook ['call'] = 'IMAP_PAM_check';
$ c-> authenticate_hook ['config'] = array (
'imap_url' => '{davical.local: 993 / imap / tls / novalidate-cert}',
);
include ('/ usr / share / davical / inc / drivers_imap_pam.php');
$ c-> domain_name = 'davical.local';
$ c-> sysaddr = 'davical';
$ c-> system_name = 'DAViCal CalDAV Server';
$ c-> admin_email = 'admin@davical.local';
$ c-> pg_connect [] = 'dbname = davical user = davical_app';
$ c-> default_locale = "uk_UA";
$ c-> use_old_sync_response_tag = true;
?>Notice the
imap_url line. Judging by their
davical.dhits.nl wiki
, there are several possible options:
{localhost: 143 / imap /}
{localhost: 143 / imap / tls /}
{example.com:993/imap/ssl/}
{example.com:143/imap/tls/novalidate-cert}So - it all works (at least for me) only if at the end of the line DO NOT SET “/”
In general, each one registers this line with the parameters with which it needs it.
The server itself is already configured, but so far nothing works for us. We do web interfaces.
CalDavZap - installation and configuration.Download the program archive from
http://www.inf-it.com/open-source/clients/caldavzap/And unpack it in
/ var / wwwOpen its configuration file and edit the globalNetworkCheckSettings string
var globalNetworkCheckSettings = {href: 'http: //davical.local/caldav.php/', hrefLabel: null, additionalResources: [], forceReadOnly: null, showHeader: true, settingsAcount: true, timeOut: 30000, lockTimeOut: 10000, delegation: false, backgroundCalendars: [], ignoreAlarms: false}Now you need to configure the authorization in CalDavZap
To do this, we make the following settings:
In the
auth / config.inc file in two places in the
href field you need to enter the name of our server. What does the rest of the way not to touch. That is, we should have the following lines:
'href' => 'http: //davical.local/caldav.php/'.$_SERVER [' PHP_AUTH_USER '].' / ',
'href' => 'http: //davical.local/caldav.php/resource/',In addition, in the file
auth / plugins / generic_conf.inc, we change the value in one line.
$ pluginconfig ['base_url'] = 'http: //davical.local;Apache setupThe last action left is to configure the web server.
Create the file
/ etc / apache2 / sites-available / davical and write to it
<VirtualHost *: 80>
DocumentRoot / usr / share / davical / htdocs
DirectoryIndex index.html index.php
ServerName davical.local
Alias / images / / usr / share / davical / htdocs / images /
Alias / cal / var / www / caldavzap /
<Directory / usr / share / davical / htdocs />
AllowOverride None
Order allow, deny
Allow from all
php_value include_path / usr / share / awl / inc
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value error_reporting "E_ALL & ~ E_NOTICE"
php_value default_charset "utf-8"
Create a link to this file in
/ etc / apache2 / sites-enabled /And restart apache
Now we have two web interfaces available.
davical.local is the
Davical web interface itself, where you can either make system-wide settings, if you have admin rights, or create additional calendars or address books for yourself, if you have regular user rights.

I recommend to immediately go here as admin and change the password that we remembered at the very beginning when installing Davical
davical.local / cal - our calendar web interface

Lastly, two useful links to connect resources to external clients, such as Evolution or Outlook
davical.local / caldav.php / USERNAME / addresses - address book connection
davical.local / caldav.php / USERNAME / calendar - connect calendar.
Do not forget to replace the domain name and USERNAME with real links in these links.