diff --git a/.conf/dps_114/nginx.nextcloud.conf b/.conf/dps_114/nginx.nextcloud.conf index 150c3e859a..fc411cb27e 100644 --- a/.conf/dps_114/nginx.nextcloud.conf +++ b/.conf/dps_114/nginx.nextcloud.conf @@ -1,4 +1,4 @@ -# Based on: https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx.rst#nextcloud-in-a-subdir-of-the-nginx-webroot +# Based on: https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-subdir.conf.sample # Redirect webfinger and nodeinfo requests to Nextcloud endpoint location ~ ^/\.well-known/(?:webfinger|nodeinfo) { @@ -64,7 +64,7 @@ location ^~ /nextcloud { # then Nginx will encounter an infinite rewriting loop when it prepends # `/nextcloud/index.php` to the URI, resulting in a HTTP 500 error response. location ~ \.php(?:$|/) { - fastcgi_split_path_info ^(.+?\.php)(\/.*|)$; + fastcgi_split_path_info ^(.+?\.php)(/.*|)$; set $path_info $fastcgi_path_info; try_files $fastcgi_script_name =404; include fastcgi_params; @@ -90,6 +90,11 @@ location ^~ /nextcloud { access_log off; # Optional: Don't log access to assets } + # Rule borrowed from `.htaccess` + location /nextcloud/remote { + return 301 /nextcloud/remote.php$request_uri; + } + location /nextcloud { try_files $uri $uri/ /nextcloud/index.php$request_uri; }