See also Debian shared: systems where can be more than one DAViCal installation, and permissions are not open to other users in the system or in Apache websites.
for version 0.9.8.4 on Debian (with PostgreSQL 8.3)
- install the packages as described on http://www.davical.org/installation.php
- also make sure that a PostgreSQL server is available to your DAViCal installation (version 8.1 or higher). This database server can be on the same system as DAViCal, or on a different machine on the network. (Which is why it is not considered a dependecy of the DAViCal package.)
Connecting to the Database
Before your database has been created, you also need to edit your /etc/postgresql/#YOUR_VERSION#/main/pg_hba.conf file in order to grant the application access to the database as the 'davical_app' user, and to grant access as the 'davical_dba' user for the scripts that will run during installation and when upgrading to future versions.
In a simple installation, where you do not have untrusted users on your database server, and your database is on the same computer as the web server, the following line (near the top of the pg_hba.conf file) should be enough:
local davical davical_app trust local davical davical_dba trust
Don't forget to restart the PostgreSQL Server:
Creating and Building the Database
su postgres -c /usr/share/davical/dba/create-database.sh
Apache Web Server Configuration
It is preferable to run DAViCal in it's own virtual host. There are some features of CalDAV which make it useful for it to have access to the '/' hosted directory to handle requests for http://site.domain.com/ . It's OK to achieve this by running it on a non-standard port, and in fact using port 8443 is a common choice for CalDAV servers, so many clients expect to look for a CalDAV server there.
With Virtual Host
Your Apache instance needs to be configured for Virtual Hosts. If this is not already the case you may want to read some documentation about that, and you most likely will want to ensure that any existing site becomes the **default** virtual host, with DAViCal only being a single virtual host.
I use a Virtual Host stanza like this:
# Virtual Host def for Debian packaged DAViCal <VirtualHost 126.96.36.199 > DocumentRoot /usr/share/davical/htdocs DirectoryIndex index.php index.html ServerName davical.example.net ServerAlias calendar.example.net Alias /images/ /usr/share/davical/htdocs/images/ <Directory /usr/share/davical/htdocs/> AllowOverride None Order allow,deny Allow from all </Directory> php_value include_path /usr/share/awl/inc php_value magic_quotes_gpc 0 php_value magic_quotes_runtime 0 php_value register_globals 0 php_value error_reporting "E_ALL & ~E_NOTICE" php_value default_charset "utf-8" </VirtualHost>
Replace 188.8.131.52 with your own IP address, of course (you can use a name, but your webserver may fail on restart if DNS happens to be borked at that time).
The various paths and names need to be changed to reflect your own installation, although those are the recommended locations for the various pieces of the code (and are standard if you installed from a package).
Once your VHost is installed an working correctly, you should be able to browse to that address and see a page telling you that you need to configure DAViCal.
On Debian systems (or derivatives such as Ubuntu), when you are using Apache 2, you should put this definition in the /etc/apache2/sites-available directory and you can use the 'a2ensite' command to enable it.
Without Virtual Host
If you do not want a Virtual Host, the following line added to /etc/apache2/sites-available/default will make DAViCal visible under http://your.domain.org/cal/...:
Alias /cal/ /usr/share/davical/htdocs/
You will also need to edit /etc/php5/apache2/php/ini in order to change the PHP include path to include the AWL include directory, as follows:
include_path = ".:/usr/share/php:/usr/share/awl/inc"
Don't forget to restart the Apache Web Server:
Create the file /etc/davical/config.php (or /etc/davical/<domain>-conf.php if you will host multiple instances of DAViCal on this computer) and copy the following content into it:
<?php $c->admin_email = 'firstname.lastname@example.org'; $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';
Adjust the values where appropriate. In older versions of DAViCal the "general" database user was used rather than "davical_app".
The password should be printed on the screen during database creation. You can also retrieve it by
su postgres psql davical -c 'select username, password from usr;'
(the password is the bit after the '**' in the 'password' field of the 'usr' table)
Login to DAViCAL Admin
If all is going well you should now be able to browse to the admin pages and log in as 'admin' with the given password on <servername>/cal/.
Make sure there is no newline after the php end tag (?>) in your /etc/davical/<hostname>-conf.php . Better yet: remove the unecessary ?> altogether.
This problem might also appear as a DAV_NOT_DAV error in the Lightning/Sunbird log files, although that error may also indicate other problems, such as excessively verbose error reporting.