summaryrefslogtreecommitdiffstats
path: root/roles/nextcloud/files/etc/nginx/sites-available/nextcloud
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2021-05-23 01:25:23 +0200
committerGuilhem Moulin <guilhem@fripost.org>2021-05-23 01:25:23 +0200
commit5d1907daa5e38f5c287a17e082b50cc01a72f396 (patch)
treea0e0f58a14b40f8a2240f88386ef5bc3e6aa1859 /roles/nextcloud/files/etc/nginx/sites-available/nextcloud
parent7b23a7434ad050a73cedbeab6feb6ce6deb30015 (diff)
Nextcloud: Adapt configuration to v21.
Diffstat (limited to 'roles/nextcloud/files/etc/nginx/sites-available/nextcloud')
-rw-r--r--roles/nextcloud/files/etc/nginx/sites-available/nextcloud10
1 files changed, 4 insertions, 6 deletions
diff --git a/roles/nextcloud/files/etc/nginx/sites-available/nextcloud b/roles/nextcloud/files/etc/nginx/sites-available/nextcloud
index 52f24e0..1bab6fd 100644
--- a/roles/nextcloud/files/etc/nginx/sites-available/nextcloud
+++ b/roles/nextcloud/files/etc/nginx/sites-available/nextcloud
@@ -41,8 +41,9 @@ server {
access_log /var/log/nginx/cloud.access.log;
error_log /var/log/nginx/cloud.error.log info;
- location = /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; }
- location = /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; }
+ location = /.well-known/carddav { return 301 /remote.php/dav; }
+ location = /.well-known/caldav { return 301 /remote.php/dav; }
+ location ^~ /.well-known/ { return 301 /index.php$request_uri; }
# set max upload size
client_max_body_size 512M;
@@ -57,10 +58,7 @@ server {
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
- error_page 403 /core/templates/403.php;
- error_page 404 /core/templates/404.php;
-
- location = / { return 303 $scheme://$host/apps/files/; }
+ location = / { return 303 /apps/files/; }
location / { rewrite ^ /index.php$uri last; }
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ { internal; }