detrout / irony

My modifications to the kolabsys cal/carddav component iRony.
1 stars 2 forks source link

iRony sync with OS X fails #1

Open marbetschar opened 9 years ago

marbetschar commented 9 years ago

Hi!

I'm experiencing some problems using iRony for synchronize contacts with my iPhone and OS X. The sync with the iPhone runs just fine - but not with the OS X Contacts App. It throws the following error:

"CoreDAVHTTPStatusErrorDomain-Error 404".

The server log shows the following

84.72.105.35 - - [05/Apr/2015:01:12:44 +0200] "POST /ffbc705924943b4d/?_task=addressbook&_action=refresh HTTP/1.1" 200 3964 "https://mail.mandelkind.ch/ffbc705924943b4d/?_task=addressbook" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/600.4.10 (KHTML, like Gecko) Version/8.0.4 Safari/600.4.10"
184.75.210.90 - - [05/Apr/2015:01:12:46 +0200] "GET / HTTP/1.1" 200 6835 "-" "Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)"
84.72.105.35 - - [05/Apr/2015:01:12:48 +0200] "OPTIONS /principals/marco.betschart%40mandelkind.ch/ HTTP/1.1" 401 3799 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"
84.72.105.35 - marco@mandelkind.ch [05/Apr/2015:01:12:48 +0200] "OPTIONS /principals/marco.betschart%40mandelkind.ch/ HTTP/1.1" 200 613 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"
84.72.105.35 - marco@mandelkind.ch [05/Apr/2015:01:12:49 +0200] "PROPFIND /principals/marco.betschart%40mandelkind.ch/ HTTP/1.1" 207 1738 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"
84.72.105.35 - - [05/Apr/2015:01:12:49 +0200] "PROPFIND /addressbooks/marco.betschart%40mandelkind.ch/ HTTP/1.1" 401 746 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"
84.72.105.35 - marco@mandelkind.ch [05/Apr/2015:01:12:49 +0200] "PROPFIND /addressbooks/marco.betschart%40mandelkind.ch/ HTTP/1.1" 207 3562 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"
84.72.105.35 - marco@mandelkind.ch [05/Apr/2015:01:12:49 +0200] "PROPFIND /addressbooks/marco.betschart%40mandelkind.ch/__all__/ HTTP/1.1" 207 1066 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"
84.72.105.35 - marco@mandelkind.ch [05/Apr/2015:01:12:50 +0200] "PROPFIND /addressbooks/marco.betschart%40mandelkind.ch/__all__/ HTTP/1.1" 207 1178 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"
84.72.105.35 - marco@mandelkind.ch [05/Apr/2015:01:12:50 +0200] "REPORT /addressbooks/marco.betschart%40mandelkind.ch/__all__/ HTTP/1.1" 404 650 "-" "Mac OS X/10.10.2 (14C1514) AddressBook/1563"

I've modified the config under /etc/iRony/dav.inc.php with the following

// The HTTP path to the iRony root directory.
// Set to / if the service is registered as document root for a virtual host
$config['base_uri'] = '/';

And my apache config looks like:

<VirtualHost *:80>
ServerName dav.mandelkind.ch
Redirect permanent / https://dav.mandelkind.ch
</VirtualHost>

<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName dav.mandelkind.ch
ServerAdmin admin@mandelkind.ch
DocumentRoot /usr/share/iRony/public_html

SSLEngine on
    SSLCertificateFile /etc/ssl/ch.mandelkind/wildcard.crt
    SSLCertificateKeyFile /etc/ssl/ch.mandelkind/wildcard.key
    SSLCertificateChainFile /etc/ssl/DigiCertCA.crt

<Directory "/usr/share/iRony/public_html/">
 AllowOverride All

 <IfModule mod_authz_core.c>
     # Apache 2.4
     Require all granted
    </IfModule>
 <IfModule !mod_authz_core.c>
      # Apache 2.2
      Order Allow,Deny
        Allow from All
 </IfModule>

RewriteEngine On
RewriteBase /
RewriteRule ^.well-known/caldav   https://dav.mandelkind.ch/ [L,R=301]
RewriteRule ^.well-known/carddav  https://dav.mandelkind.ch/ [L,R=301]

    RewriteCond  %{REQUEST_FILENAME}  !-f
 RewriteCond  %{REQUEST_FILENAME}  !-d
   RewriteRule  (.*)                 index.php  [qsappend,last]

</Directory>

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

What's wrong?

detrout commented 9 years ago

I didn't write iRony, I just cloned it from kolab.org. CalDAV is kind of messy and complex.

https://kolab.org/news/2015/03/16/kolab-3.1-alpha-released-irony makes some reference to configuring iRony to work with Apple's clients.

The official client runs on OS X as well. https://kolab.org/clients