Skip to content

Commit 835873d

Browse files
authored
v7.1
+ DietPi-Software | Nextcloud: Add missing pretty URL remote.php redirects from latest official Nextcloud docs update: nextcloud/documentation#6221
1 parent b5db198 commit 835873d

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.conf/dps_114/nginx.nextcloud.conf

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Based on: https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx.rst#nextcloud-in-a-subdir-of-the-nginx-webroot
1+
# Based on: https://github.com/nextcloud/documentation/blob/master/admin_manual/installation/nginx-subdir.conf.sample
22

33
# Redirect webfinger and nodeinfo requests to Nextcloud endpoint
44
location ~ ^/\.well-known/(?:webfinger|nodeinfo) {
@@ -64,7 +64,7 @@ location ^~ /nextcloud {
6464
# then Nginx will encounter an infinite rewriting loop when it prepends
6565
# `/nextcloud/index.php` to the URI, resulting in a HTTP 500 error response.
6666
location ~ \.php(?:$|/) {
67-
fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
67+
fastcgi_split_path_info ^(.+?\.php)(/.*|)$;
6868
set $path_info $fastcgi_path_info;
6969
try_files $fastcgi_script_name =404;
7070
include fastcgi_params;
@@ -90,6 +90,11 @@ location ^~ /nextcloud {
9090
access_log off; # Optional: Don't log access to assets
9191
}
9292

93+
# Rule borrowed from `.htaccess`
94+
location /nextcloud/remote {
95+
return 301 /nextcloud/remote.php$request_uri;
96+
}
97+
9398
location /nextcloud {
9499
try_files $uri $uri/ /nextcloud/index.php$request_uri;
95100
}

0 commit comments

Comments
 (0)