Update nextcloud.subdomain.conf.sample

Update for nextcloud 21
Security safety recommendation  for .well-known
https://docs.nextcloud.com/server/21/admin_manual/installation/nginx.html
This commit is contained in:
EVOTk 2021-02-22 23:02:23 +01:00 committed by GitHub
commit f06a31b8d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,4 +33,20 @@ server {
proxy_max_temp_file_size 2048m;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ^~ /.well-known {
# The following 6 rules are borrowed from `.htaccess`
location = /.well-known/carddav { return 301 /remote.php/dav/; }
location = /.well-known/caldav { return 301 /remote.php/dav/; }
# Anything else is dynamically handled by Nextcloud
location ^~ /.well-known { return 301 /index.php$uri; }
try_files $uri $uri/ =404;
}
}