OwnCloud .well-known configuration



  • I'm on OwnCloud 8.2 and have the Calendar, Tasks and contacts (imported from Google contacts) set up.

    When I create a new account on my tablet I get the options to sync Tasks and the calendar, but not the contacts.

    Thanks,


  • admin

    Hello,

    did you try our help page: https://davdroid.bitfire.at/configuration/owncloud/ ?

    Contacts sync should work fine... Do you have the most recent version of OwnClouds contacts app?



  • Yes, have read the help and found that mod_rewrite was not enabled; it is now.

    The result is the same.

    When I set up two accounts (caldav, carddav) everything works as expected; I get calenders, tasks in one account and the contacts in the other

    The access log when connecting to caldav is

    "GET /leoscloud/status.php HTTP/1.1" 200 2942 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 1227 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "GET /leoscloud/ocs/v1.php/cloud/capabilities?format=json HTTP/1.1" 200 1354 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3070 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3227 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3227 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/caldav HTTP/1.1" 207 4157 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "OPTIONS /leoscloud/remote.php/caldav HTTP/1.1" 200 1028 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /.well-known/carddav HTTP/1.1" 405 692 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/caldav HTTP/1.1" 207 1790 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "OPTIONS /leoscloud/remote.php/caldav HTTP/1.1" 200 1028 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/caldav/principals/poldi/ HTTP/1.1" 207 1449 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/caldav/calendars/poldi/ HTTP/1.1" 207 5819 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3227 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    

    The access log when connecting to carddav is

    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3257 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3227 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3227 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    "PROPFIND /leoscloud/remote.php/carddav HTTP/1.1" 207 4016 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "OPTIONS /leoscloud/remote.php/carddav HTTP/1.1" 200 1008 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/carddav/principals/poldi/ HTTP/1.1" 207 1403 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/carddav/addressbooks/poldi/ HTTP/1.1" 207 3046 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/carddav HTTP/1.1" 207 1893 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "OPTIONS /leoscloud/remote.php/carddav HTTP/1.1" 200 1008 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /.well-known/caldav HTTP/1.1" 405 691 "-" "DAVdroid/0.9.1.3 (2016/01/02; dav4android) Android/5.0.2"
    "PROPFIND /leoscloud/remote.php/webdav/ HTTP/1.1" 207 3227 "-" "Mozilla/5.0 (Linux) mirall/2.1.0"
    

    So the only issue now is how to get caldav and carddav from a single DavDroid account with mod_rewrite

    .htaccess has the following section (default from the owncloud installation)

    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
      RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
      RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
      RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R=301,L]
      RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R=301,L]
      RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L]
      RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L]
      RewriteRule ^remote/(.*) remote.php [QSA,L]
      RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
      RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
    </IfModule>
    

    Thanks,


  • developer

    RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R=301,L]
    RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R=301,L]
    

    If your OwnCloud is located at /leoscloud/, the well-known URLs should point there, too: →/leoscloud/remote.php/<service>/



  • @rfc2822 said:

    RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R=301,L]
    RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R=301,L]
    

    If your OwnCloud is located at /leoscloud/, the well-known URLs should point there, too: →/leoscloud/remote.php/<service>/

    which is configured in <apache>/conf.d/owncloud.conf:

    ## Please enable this manually, if needed. See also
    ## https://doc.owncloud.org/server/8.2/admin_manual/issues/index.html#apple-ios
    # Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav
    # Redirect 301 /.well-known/caldav  /owncloud/remote.php/caldav
    

    The .well-kown redirect in .htaccess is only used, when running owncloud in the root context '/'


  • developer

    @jochen314 said:

    The .well-kown redirect in .htaccess is only used, when running owncloud in the root context '/'

    So have you configured /.well-known/<service> in the root path so that they point to the correct destination URLs?

    /.well-known/carddav → /leoscloud/remote.php/carddav
    /.well-known/caldav → /leoscloud/remote.php/caldav
    


  • @rfc2822

    Yes, that is the rigth way

    (I don't use it myself as a have my owncloud in the root context)

    I am not the one having the problem ( @list171254 ), just trying to help him find the right place to configure it :-)


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.