nixos/nextcloud: update nginx config
Please note that I didn't use the current nginx config from the administration manual as this would've broken ACME challenges[1]. Also added a fix for Microsoft clients. [1] https://github.com/nextcloud/documentation/pull/5825#issuecomment-783977761
This commit is contained in:
parent
b1f65920c3
commit
797721423c
1 changed files with 11 additions and 0 deletions
|
@ -612,6 +612,14 @@ in {
|
|||
access_log off;
|
||||
'';
|
||||
};
|
||||
"= /" = {
|
||||
priority = 100;
|
||||
extraConfig = ''
|
||||
if ( $http_user_agent ~ ^DavClnt ) {
|
||||
return 302 /remote.php/webdav/$is_args$args;
|
||||
}
|
||||
'';
|
||||
};
|
||||
"/" = {
|
||||
priority = 900;
|
||||
extraConfig = "rewrite ^ /index.php;";
|
||||
|
@ -630,6 +638,9 @@ in {
|
|||
location = /.well-known/caldav {
|
||||
return 301 /remote.php/dav;
|
||||
}
|
||||
location ~ ^/\.well-known/(?!acme-challenge|pki-validation) {
|
||||
return 301 /index.php$request_uri;
|
||||
}
|
||||
try_files $uri $uri/ =404;
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue