Hinweis: es wurde eine bereits bestehende Davical-Datenbank transferiert!
Postgres in der Version 11
Davical 1.1.8

Davical und postgres installieren

apt-get install davical
apt-get install postgres

Davical konfigurieren

vim /etc/davical/cal3.example.com-conf.php

domain_name  = 'cal3.example.com';
  $c->sysabbr     = 'davical';
  $c->system_name = 'DAViCal CalDAV Server';

  $c->admin_email  = 'davical@example.com';
  $c->pg_connect[] = 'dbname=davical port=5432 user=davical_app';
  $c->default_locale = "de_DE";

Achtung: der Name der Konfigurationsdatei muss mit dem Hostnamen des Kalenderserver übereinstimmen!

postgres konfigurieren

vim /etc/postgresql/11/main/pg_hba.conf

…
# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# Allow local access for davical
local   davical         davical_app                             trust
local   davical         davical_dba                             trust
host    davical         davical_app     127.0.0.1/32            trust
host    davical         davical_dba     127.0.0.1/32            trust
host    davical         davical_app     ::1/128                 trust
host    davical         davical_dba     ::1/128                 trust

# "local" is for Unix domain socket connections only
local   all             all                                     peer
…

Hinweis: der fett ausgeführte Teil muss vor allen anderen Definitienen erolgen, damit sie greifen!

Konfiguration Apache

Erweiterung der Ports

vim /etc/apache2/ports.conf

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf

Listen 80

<IfModule ssl_module>
        Listen 443
        <strong>>isten 8443</strong>
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

Davical Konfiguration

vim /etc/apache2/conf-available/davical.conf

## /etc/apache2/conf-available/davical.conf


<IfModule mod_ssl.c>
Alias /davical /usr/share/davical/htdocs
<Directory /usr/share/davical/htdocs>


       Require all granted
       Options Indexes
       DirectoryIndex index.php
#       php_flag magic_quotes_gpc Off
#       php_flag register_globals Off
</Directory>
</IfModule>

Davical-Site-Konfiguration

vim /etc/apache2/sites-available/davical.conf

<VirtualHost *:8443 >
  DocumentRoot /usr/share/davical/htdocs
  SSLEngine on
  SSLCertificateFile /etc/ssl/2018/STAR_example_at.crt
  SSLCertificateKeyFile /etc/ssl/2018/example.at.key
  DirectoryIndex index.php index.html
  ServerName cal3.example.com
  ServerAlias cal.example.com
  Alias /images/ /usr/share/davical/htdocs/images/
  CustomLog /var/log/apache2/davical_access.log combined
  ErrorLog /var/log/apache2/davical-error.log
  <Directory /usr/share/davical/htdocs/>
      AllowOverride None
      Order allow,deny
      Allow from all
  </Directory>
  AcceptPathInfo On
  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"
  php_admin_flag suhosin.server.strip off
  RewriteEngine On
  RewriteCond %{REQUEST_URI} !^/$
  RewriteCond %{REQUEST_URI} !/.(php|css|js|png|gif|jpg)
  RewriteRule ^(/principals/users.*)$ /caldav.php$1 [NC,L]
</VirtualHost>

Aktivierung der Apachen-Konfiguration

a2enconf davical
a2ensite davical
systemctl restart apache2

Aus unbekannten Gründen musste auch noch die Datenbank upgedatet werden (wie nach einem Davical Upgrade):
/usr/share/davical/dba/update-davical-database

Anleitung zur kompletten Neuinstallation (inkl. anlegen der Datenbanken)

Davical Installation