2. Configuration

Configuring AgenDAV requires modifying some PHP text files located in the web/config/ directory.

The following files are usually found as filename.php.template, so make a copy of them with the correct file name to make them work.

Note

ldap.php was removed in AgenDAV 1.1.1

2.1. General configuration (config.php)

config.php file specifies general options about AgenDAV environment. It loads a set of default option values from defaults.php, but it is recommended to configure all of the following variables.

Please, do not modify defaults.php, as it is a file that updates on every AgenDAV upgrade to avoid problems if you forget any configuration setting.

base_url

Specify here your full public URL to access AgenDAV, adding a trailing slash. Example:

$config['base_url'] = 'https://agendav.host/';
show_in_log

Array of logging levels which will appear in logs. Possible logging levels are:

  • ERROR: error messages, recommended
  • INFO: informational messages, recommended
  • AUTHERR: authentication errors
  • AUTHOK: successful authentications
  • INTERNALS: AgenDAV internal processing actions, not recommended unless you are having problems or you want to debug AgenDAV
  • DEBUG: CodeIgniter internal debug. Do not enable unless you know what you are doing

Example:

$config['show_in_log']= array('ERROR','INFO','AUTHERR', 'AUTHOK');
log_path

Full path where logs will be created. Add a trailing slash. Example:

$config['log_path'] = '/var/log/agendav/';

Make sure the user that runs your web server has write rights on that directory.

encryption_key

Random string which will be used to encrypt some cookie values.

Prefix that should be prepended to your cookie names. Useful if you have several sites hosted on the same hostname and you want to avoid name collisions

Domain the cookie will be defined for. Use .domain.tld or full.host.domain.tld, depending on what you want.

Path the cookie will be defined for.

Create cookies only for use in https environments. Set it TRUE if your users access AgenDAV via https.

proxy_ips

Comma delimited IPs of your proxies, which will make CodeIgniter framework to trust the HTTP_X_FORWARDED_FOR header. Leave it blank if your AgenDAV installation isn’t being accessed via HTTP proxy.

site_title

Title of every page

Image filename which will be used as a logo. Has to be a valid filename placed inside web/public/img/ directory.

Text to be placed in the footer.

logout_redirect_to

When logging out from AgenDAV, the URL the user will be redirected to.

Can be left empty to redirect user to login page again.

additional_js

Array of additional JavaScript files which you will be loading on every page. They have to be placed inside web/public/js

show_public_caldav_url

Whether to show CalDAV URL links or not in the edit dialog

default_language

Language to be used in AgenDAV interface.

Currently available options (languages):

  • de_DE: German
  • en_US: English (United States)
  • es_ES: Spanish

New in version 1.2.

default_time_format

Preferred time format: 12 hours (e.g. 3pm / 2:30am) or 24 hours (e.g. 15:00 / 2:30).

Set this option using a string ('12' or '24').

New in version 1.2.

default_date_format

Preferred date format to be used inside date fields. Possible values are:

  • ymd: e.g. 2011/10/22
  • dmy: e.g. 22/10/2011
  • mdy: e.g. 10/22/2011

New in version 1.2.

default_first_day

Which day should be considered the first of the week. Starting with 0 (Sunday), 1 means Monday and so on.

Use a numerical value, not an integer.

New in version 1.2.

default_timezone

Timezone to be used internally. Will be used for recalculating other timezone dates and hours to be sent to the browser, ignoring browser configured timezone.

Make sure you use a valid timezone from http://php.net/timezones

New in version 1.2.

default_calendar_color

Deprecated since version 1.2.3.

Default background and foreground colors for calendars. Has to be specified as an associative array. Example:

// Default background color: #B5C7EB
// Default foreground (text) color: #000000
$config['default_calendar_color'] = array('B5C7EB' => '000000');
additional_calendar_colors

Deprecated since version 1.2.3.

List of selectable background and foreground color combinations. Specify them as an associative array. Example:

// background color => foreground color
$config['additional_calendar_colors'] = array(
        'FAC5C0' => '000000',
        'B7E3C0' => '000000',
        'CAB2FC' => '000000',
        'F8F087' => '000000',
        'E6D5C1' => '000000',
        'FFC48C' => '000000',
        'DAF5FF' => '000000',
        'C4C4BC' => '000000',
);
calendar_colors

List of selectable background colors. Foreground color will be automatically calculated depending on the darkness of the color. Specify them as an array. Example:

$config['calendar_colors'] = array(
        '9CC4E4',
        '3A89C9',
        '107FC9',
        'FAC5C0',
        'FF4E50',
        'BD3737',
        'C9DF8A',
        '77AB59',
        '36802D',
        'F8F087',
        'E6D5C1',
        '3E4147',
);

2.2. Database configuration (database.php)

database.php contains how to connect to your MySQL database. Just follow inline comments, it’s pretty straight forward.

2.3. CalDAV specific options (caldav.php)

Here you will configure every single aspect of your CalDAV server.

caldav_url

Deprecated since version 1.2.4.

caldav_principal_url

Used by AgenDAV to generate a principal URL for your CalDAV server. The placeholder %u will be replaced by an username.

Needs a trailing slash.

Example:

// Example 1: DAViCal
$config['caldav_principal_url'] = 'http://10.0.0.12/caldav.php/%u/';

// Example 2: SabreDAV
$config['caldav_principal_url'] = 'http://10.0.0.12/calendarserver.php/principals/%u/';

// Example 3: Calendar server
$config['caldav_principal_url'] = 'http://10.0.0.12/calendars/users/%u/';

Principal URL for user my_user for example 2 will be:

caldav_calendar_url

Used by AgenDAV to generate a calendar collection URL or resource URL for your CalDAV server. The placeholder %s will be replaced by AgenDAV with required values.

Example:

// DAViCal
$config['caldav_calendar_url'] = 'http://10.0.0.12/caldav.php/%s/';

Resource with UID=aaa0001 on calendar ‘work’ for user3 will become:

Calendar ‘test’ for user1 will become:

public_caldav_url

The URL that will be shown to users if show_public_caldav_url is enabled. It’s not used for internal connections. Placeholder %s will be replaced by current username and calendar.

Needs a trailing slash.

Example:

$config['public_caldav_url'] = 'https://public.caldav.tld/caldav.php/%s/';

Will become for user user2 and calendar myhomecalendar:

enable_calendar_sharing

Enables an option to share calendars between users.

Note that calendar sharing requires full WebDAV ACL support on your CalDAV server. Some servers, such as SabreDAV (at least on current release, 1.5.6), don’t support them, so you should set this option to FALSE if your server can’t handle ACLs.

owner_permissions

List of DAV permissions used for the calendar owner when sharing a calendar. As DAV ACLs are used, when editing a calendar sharing options a full ACL has to be built with the following structure:

Please, refer to your CalDAV server documentation to know which permissions does it support.

For DAViCal you can follow Permissions page on DAViCal wiki. Default values of this option will work all right for DAViCal.

See also

Used in conjunction with options share_permissions and default_permissions.

share_permissions

List of DAV permissions used for granted users when another user shares a calendar with them.

Please, refer to your CalDAV server documentation to know which permissions does it support.

Default value lets users to read and write on shared calendars. AgenDAV doesn’t support at this moment to select whether you want read or shared rights.

See also

Used in conjunction with options owner_permissions and default_permissions.

default_permissions

List of DAV permissions used for users which are not owner neither granted users when some user shares a calendar with other ones.

Please, refer to your CalDAV server documentation to know which permissions does it support.

Default value lets users just to make free/busy queries in DAViCal.

See also

Used in conjunction with options owner_permissions and share_permissions.

2.4. Other configuration files

2.4.1. Advanced options (advanced.php)

This file should be kept untouched unless you know what you are trying to modify. It contains several options that make AgenDAV work by default.