From 71bc6e6ab75d5b99dd4a0d9801d7190ebdd59502 Mon Sep 17 00:00:00 2001 From: BernieO Date: Thu, 28 Feb 2019 17:33:22 +0100 Subject: [PATCH 1/3] change nginx-config for subdir to resolve /ocm-provider properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After upgrading to 15.0.5 this is shown in the Admin-panel: ``` Your web server is not properly set up to resolve “/ocm-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. ``` I think for runnning nextcloud in a subdirectory of webroot, this redirect has to be added to the configuration signed-off by bernieo.github@gmx.de --- admin_manual/installation/nginx.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/admin_manual/installation/nginx.rst b/admin_manual/installation/nginx.rst index df7ae87cb..0eb0fb3f6 100644 --- a/admin_manual/installation/nginx.rst +++ b/admin_manual/installation/nginx.rst @@ -255,6 +255,9 @@ your nginx installation. location = /.well-known/caldav { return 301 $scheme://$host/nextcloud/remote.php/dav; } + location ~/(ocm-provider|ocs-provider)/ { + return 301 $scheme://$host/nextcloud/$1/; + } location /.well-known/acme-challenge { } From 0232831d26c39a8107585104d2eba5470c854050 Mon Sep 17 00:00:00 2001 From: BernieO Date: Sun, 3 Mar 2019 07:42:30 +0100 Subject: [PATCH 2/3] update nginx subdir config to resolve oc(m|s)-provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit signed-off-by Bernhard Ostertag After upgrading to 15.0.5 this is shown in the Admin-panel: ``` Your web server is not properly set up to resolve “/ocm-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. Your web server is not properly set up to resolve “/ocs-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. ``` I think for runnning nextcloud in a subdirectory of webroot, this rewrite has to be added to the nignx configuration when running nextcloud in a subdirectory of webroot --- admin_manual/installation/nginx.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin_manual/installation/nginx.rst b/admin_manual/installation/nginx.rst index 0eb0fb3f6..112801367 100644 --- a/admin_manual/installation/nginx.rst +++ b/admin_manual/installation/nginx.rst @@ -256,7 +256,8 @@ your nginx installation. return 301 $scheme://$host/nextcloud/remote.php/dav; } location ~/(ocm-provider|ocs-provider)/ { - return 301 $scheme://$host/nextcloud/$1/; + location ~ ^\/(?:ocm-provider|ocs-provider).* { + rewrite ^ /nextcloud$request_uri; } location /.well-known/acme-challenge { } From 83bb1aa353ba200d04373be85791cc8c4b89eaa9 Mon Sep 17 00:00:00 2001 From: BernieO Date: Sun, 3 Mar 2019 07:44:35 +0100 Subject: [PATCH 3/3] update nginx subdir config to properly resolve oc(m|s)-provider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit signed-off-by Bernhard Ostertag After upgrading to 15.0.5 this is shown in the Admin-panel: ``` Your web server is not properly set up to resolve “/ocm-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. Your web server is not properly set up to resolve “/ocs-provider/”. This is most likely related to a web server configuration that was not updated to deliver this folder directly. Please compare your configuration against the shipped rewrite rules in “.htaccess” for Apache or the provided one in the documentation for Nginx at it’s documentation page 1. On Nginx those are typically the lines starting with “location ~” that need an update. ``` I think for runnning nextcloud in a subdirectory of webroot, this rewrite has to be added to the nignx configuration when running nextcloud in a subdirectory of webroot --- admin_manual/installation/nginx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_manual/installation/nginx.rst b/admin_manual/installation/nginx.rst index 112801367..39bb9969e 100644 --- a/admin_manual/installation/nginx.rst +++ b/admin_manual/installation/nginx.rst @@ -255,7 +255,7 @@ your nginx installation. location = /.well-known/caldav { return 301 $scheme://$host/nextcloud/remote.php/dav; } - location ~/(ocm-provider|ocs-provider)/ { + location ~ ^\/(?:ocm-provider|ocs-provider).* { rewrite ^ /nextcloud$request_uri; }