Skip to content

Commit

Permalink
v7.1
Browse files Browse the repository at this point in the history
+ DietPi-Software | Nextcloud: Add missing pretty URL remote.php redirects from latest official Nextcloud docs update: nextcloud/documentation#6221
  • Loading branch information
MichaIng authored Apr 8, 2021
1 parent b5db198 commit 835873d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .conf/dps_114/nginx.nextcloud.conf
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 835873d

Please sign in to comment.