Installing Davical on Debian server

apt-get install libpq-dev postgresql php5 php5-pgsql php5-imap php5-curl php5-cgi libyaml-perl libdbi-perl davical
emacs /etc/postgresql/9.4/main/pg_hba.conf

Add at the very top of the file:

local   davical    davical_app   trust
local   davical    davical_app   trust

Reload postgresql:

/etc/init.d/postgresql restart

Now:

cd /usr/share/davical/dba
su postgres -c /usr/share/davical/dba/create-database.sh

It gives message:

Supported locales updated.
Updated view: dav_principal.sql applied.
CalDAV functions updated.
RRULE functions updated.
Database permissions updated.
NOTE
====
*  The password for the 'admin' user has been set to 'something'
Thanks for trying DAViCal!  Check in /usr/share/doc/davical/examples/ for
some configuration examples.  For help, visit #davical on irc.oftc.net.

Create virtual server and edit the config:

emacs /etc/apache2/sites-available/davical.joel.co.in.conf
Davical wiki recommends the following:

<VirtualHost x.y.z.a>
	DocumentRoot /usr/share/davical/htdocs
	DirectoryIndex index.php index.html
	ServerName davical.yoursite.com
	ServerAlias calendar.yoursite.com
	Alias /images/ /usr/share/davical/htdocs/images/
	ErrorLog /var/log/virtualmin/davical.yoursite.com_error_log
	CustomLog /var/log/virtualmin/davical.yoursite.com_access_log combined
	<Directory /usr/share/davical/htdocs/>
		  AllowOverride None
		  Order allow,deny
		  Allow from all
	</Directory>
	AcceptPathInfo On
</VirtualHost>

But only the following worked:

<VirtualHost *:80>
ServerName davical.yoursite.com
ServerAlias calendar.yoursite.com
DocumentRoot /usr/share/davical/htdocs
DirectoryIndex index.php index.html
Alias /images/ /usr/share/davical/htdocs/images/
ErrorLog /var/log/virtualmin/davical.yoursite.com_error_log
CustomLog /var/log/virtualmin/davical.yoursite.com_access_log combined
<Directory /usr/share/davical/htdocs/>
    Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
    allow from all
    AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
    Require all granted
    AddType application/x-httpd-php .php
    AddHandler fcgid-script .php
    AddHandler fcgid-script .php5
    FCGIWrapper /home/joel/domains/davical.yoursite.com/fcgi-bin/php5.fcgi .php
    FCGIWrapper /home/joel/domains/davical.yoursite.com/fcgi-bin/php5.fcgi .php5
</Directory>
AcceptPathInfo On
</VirtualHost>

Now reload apache and the webpage.
Configure the file adding the following:

$c->admin_email = [email protected]';
    $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';

Now reload the page and it should show login screen. Use the password that was earlier generated.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.