I was going though the motions of setting up and configuring a swag container to act as a reverse proxy for my local nextcloud instance.
While reading the official documentation I noticed that there is something missing from nextcloud.subdomain.conf.sample
that may be important.
Copying from the documentation page:
The redirects for CalDAV or CardDAV does not work if Nextcloud is running behind a reverse proxy.
The recommended solution is that your reverse proxy does the redirects.
And they suggest adding something like:
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
or something like:
rewrite ^/\.well-known/carddav https://$server_name/remote.php/dav/ redirect;
rewrite ^/\.well-known/caldav https://$server_name/remote.php/dav/ redirect;
Do you think that those redirects should be added to the sample configs?
I 've added them to my proxy config although I wasn’t sure how to test if they are needed. I 'll need some time to look it up.