Skip to content

Commit a8105af

Browse files
authored
Merge pull request #367 from Wdavery/patch-1
Fixes for NC21 - changes /.well-known block
2 parents 6435f9d + fca823b commit a8105af

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

nextcloud.subfolder.conf.sample

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2021/07/08
1+
## Version 2021/07/14
22
# Assuming this container is called "swag", edit your nextcloud container's config
33
# located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
44
# 'trusted_proxies' => ['swag'],
@@ -11,18 +11,17 @@
1111
# 1 => 'your-domain.com',
1212
# ),
1313

14-
# Redirects for DAV clients
15-
location = /.well-known/carddav {
16-
return 301 $scheme://$host/nextcloud/remote.php/dav;
17-
}
14+
location ^~ /.well-known {
15+
# The rules in this block are an adaptation of the rules
16+
# in the Nextcloud `.htaccess` that concern `/.well-known`.
1817

19-
location = /.well-known/caldav {
20-
return 301 $scheme://$host/nextcloud/remote.php/dav;
21-
}
18+
location = /.well-known/carddav { return 301 /nextcloud/remote.php/dav/; }
19+
location = /.well-known/caldav { return 301 /nextcloud/remote.php/dav/; }
2220

23-
location /nextcloud {
24-
return 301 $scheme://$host/nextcloud/;
25-
}
21+
# Let Nextcloud's API for `/.well-known` URIs handle all other
22+
# requests by passing them to the front-end controller.
23+
return 301 /nextcloud/index.php$request_uri;
24+
}
2625

2726
location ^~ /nextcloud/ {
2827
include /config/nginx/proxy.conf;

0 commit comments

Comments
 (0)