sabre/dav + Postgresql + Apache on OS/2

Questo how-to è solo una integrazione di http://sabre.io/dav/gettingstarted/

  • I did not test "Installing with composer" and chose "Manual installation": download sabre/dav package from https://github.com/fruux/sabre-dav/releases ; I successfully installed version 2.04, still not tried later versions;
  • unzip "sabredav" folder and create "data" e "public" subfolders;
  • mod_dav must be disabled; with mod_rewrite enabled, create a dedicated virtual host:
    <VirtualHost *:80>
        ServerName dav.yourdomain.org
        DocumentRoot "x:/var/www/SabreDAV/"
        RewriteEngine On
        RewriteRule ^/(.*)$ /server.php [L]
        php_flag output_buffering off
        php_flag always_populate_raw_post_data off
        php_flag magic_quotes_gpc off
        php_flag mbstring.func_overload off
    </VirtualHost>
  • create server.php file according to your needs; see "examples" subfolder as reference, I used groupwareserver.php file as starting point;

For authentication, first I verified that everything was working as expected using "File" backend, then I passed to Postgresql. Create the database with:

CREATE DATABASE databasename OWNER username ENCODING 'UTF8' LC_CTYPE 'it_IT.UTF-8' LC_COLLATE 'it_IT.UTF-8' TEMPLATE template0;

Adjust encoding according to your needs. Then import tables from "examples/sql". Add users in the form "md5('username:realm:password')", e.g.:
md5("admin:SabreDAV:admin") = "87fd274b7b6c01e48d7c2f965da8ddf7"

Users must be added both to "users" and "principals" tables. Once finished, you can access:

To give more users access to your calendar, see "CalDAV Delegation".  How to integrate sabre\dav address book with Roundcube: http://www.benjamin-schieder.de/carddav.html

 

 

Aggiungi un commento