diff --git a/README.md b/README.md index b8503e4..dc96701 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ this package: * Integrate with YunoHost users and SSO - i.e. logout button * Allow one user to be the administrator (set at the installation) * Optionally access the user home folder from ownCloud files (set at the installation) - * Serve `.well-known` paths for CalDAV and CardDAV - note that they are relative to the installation path + * Serve `/.well-known` paths for CalDAV and CardDAV on the domain ## Limitations diff --git a/conf/nginx.conf b/conf/nginx.conf index f00a8c9..9c31380 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,3 +1,10 @@ +location = /.well-known/carddav { + return 301 https://$server_name#PATH#/remote.php/dav; +} +location = /.well-known/caldav { + return 301 https://$server_name#PATH#/remote.php/dav; +} + location #LOCATION# { alias #DESTDIR#/; @@ -25,10 +32,6 @@ location #LOCATION# { error_page 403 #PATH#/core/templates/403.php; error_page 404 #PATH#/core/templates/404.php; - # Rules for served well-known paths - rewrite ^#PATH#/.well-known/carddav #PATH#/remote.php/dav/ permanent; - rewrite ^#PATH#/.well-known/caldav #PATH#/remote.php/dav/ permanent; - # The following 2 rules are only needed for the user_webfinger app. # Uncomment it if you're planning to use this app. #rewrite ^#PATH#/.well-known/host-meta #PATH#/public.php?service=host-meta last;