NethServer Version: 7.6
Module: nethserver-nextcloud
I’m scratching my head trying to figure out how to get the .well-known/caldav and related paths to redirect to Nextcloud, so that certain clients (specifically, the calendar app on macOS) can use the Nextcloud calendar. Their documentation says to create a root-level .htaccess file that looks like this:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
RewriteRule ^/\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
RewriteRule ^/\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
RewriteRule ^/\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]
</IfModule>
Created that file, but no dice–Nextcloud still reports, " Your web server is not properly set up to resolve “/.well-known/caldav”. Further information can be found in the documentation." So I figured that AllowOverride was disabled, and I’d need to add these changes to the appropriate template fragment.
I copied /etc/e-smith/templates/etc/httpd/conf.d/default-virtualhost.inc/40nextcloud
into templates-custom
, and put the relevant lines in there as follows:
#
# 40nextcloud
#
RewriteEngine On
RewriteCond %\{HTTPS\} !=on
RewriteRule ^/nextcloud(/.*)?$ https://%\{HTTP_HOST\}/nextcloud$1 [L,R=301]
RewriteRule ^/\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
RewriteRule ^/\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
RewriteRule ^/\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
RewriteRule ^/\.well-known/carddav /nextcloud/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav /nextcloud/remote.php/dav/ [R=301,L]
Redirect 301 /ocm-provider /nextcloud/ocm-provider
Redirect 301 /ocs-provider /nextcloud/ocs-provider
Did signal-event nethserver-httpd-update
, but Nextcloud is still reporting the same error. curl https://mydomain/.well-known/caldav
returns a 404. I’m obviously missing something basic–any ideas?