Once again ... no resolution of /ocm-provider/

Please apologizie, there are a lot of sites about that issue. I’ve tried so much, but I cannot find a solution …
Here my setup …

Ubuntu 18.04 / NC16 / PHP7.3.2 / NGINX 1.15.9

There’s the warning regarding /ocm-provider/ in the admin-panel …

NC is installed in /var/www/nextcloud and is listening to https://cloud.escher.cc (Reverse Proxy).

See here the part my gateway.conf … Link

See here the nextcloud.conf … Link

Lot’s of thanks for your help,

Tom

Hi,

Can you post the complete warning here, please?
Is there any additional information in the nextcloud.log? Some error messages which seem related?

For better diagnosis I switched my system from german to english …

  • 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. On Nginx those are typically the lines starting with “location ~” that need an update.

There’s no useful info in nextcloud.log

Did you check if the mentioned folder exists in your nextcloud installation folder and has all the necessary permissions and ownerships?

# ls -l /var/www/nextcloud/
total 140K
drwxr-x--- 14 http http 4.0K Apr 10 11:42 .
drwxr-x---  3 http http   23 Jul 30  2017 ..
drwxr-x--- 32 http http 4.0K Apr 10 11:39 3rdparty
drwxr-x--- 87 http http 4.0K Apr 26 22:26 apps
drwxr-x---  2 http http  122 Apr 10 11:39 config
drwxr-x--- 18 http http 4.0K Apr 10 11:39 core
drwxr-x---  6 http http  125 Apr 10 11:39 lib
drwxr-x---  2 http http   23 Apr 10 11:39 ocm-provider
drwxr-x---  2 http http   55 Apr 10 11:39 ocs
drwxr-x---  2 http http   23 Apr 10 11:39 ocs-provider
drwxr-x---  4 http http  107 Apr 10 11:39 resources

# ls -l ocm-provider/
total 4.0K
-rw-r----- 1 http http 1.4K Apr 10 11:39 index.php

While you run nginx it shouldn’t be an issue with .htaccess files.

Looks so. Here the result …

root@SV-SYDNEY:~# ls -l /var/www/nextcloud/

insgesamt 148
drwxr-xr-x 32 www-data www-data 4096 Apr 26 23:04 3rdparty
drwxr-xr-x 64 www-data www-data 4096 Apr 26 23:08 apps
-rw-r–r-- 1 www-data www-data 12063 Apr 26 23:04 AUTHORS
drwxr-xr-x 2 www-data www-data 4096 Apr 26 23:04 config
-rw-r–r-- 1 www-data www-data 3805 Apr 26 23:04 console.php
-rw-r–r-- 1 www-data www-data 34520 Apr 26 23:04 COPYING
drwxr-xr-x 23 www-data www-data 4096 Apr 26 23:04 core
-rw-r–r-- 1 www-data www-data 4986 Apr 26 23:04 cron.php
drwxr-xr-x 2 www-data www-data 4096 Mai 1 2018 data
-rw-r–r-- 1 www-data www-data 156 Apr 26 23:04 index.html
-rw-r–r-- 1 www-data www-data 3172 Apr 26 23:04 index.php
drwxr-xr-x 6 www-data www-data 4096 Apr 26 23:04 lib
-rw-r–r-- 1 www-data www-data 283 Apr 26 23:04 occ
drwxr-xr-x 2 www-data www-data 4096 Apr 27 00:09 ocm-provider
drwxr-xr-x 2 www-data www-data 4096 Apr 26 23:04 ocs
drwxr-xr-x 2 www-data www-data 4096 Apr 26 23:04 ocs-provider
-rw-r–r-- 1 www-data www-data 2951 Apr 26 23:04 public.php
-rw-r–r-- 1 www-data www-data 5139 Apr 26 23:04 remote.php
drwxr-xr-x 4 www-data www-data 4096 Apr 26 23:04 resources
-rw-r–r-- 1 www-data www-data 26 Apr 26 23:04 robots.txt
drwxr-xr-x 12 www-data www-data 4096 Apr 26 23:04 settings
-rw-r–r-- 1 www-data www-data 2232 Apr 26 23:04 status.php
drwxr-xr-x 3 www-data www-data 4096 Apr 26 23:04 themes
drwxr-xr-x 2 www-data www-data 4096 Apr 26 2018 updater
-rw-r–r-- 1 www-data www-data 362 Apr 26 23:04 version.php
root@SV-SYDNEY:~# ls -l /var/www/nextcloud/ocm-provider/
insgesamt 4
-rw-r–r-- 1 www-data www-data 1332 Apr 26 23:04 index.php
root@SV-SYDNEY:~#

Hi @kangaroo72

I think I found the reason for your issue. Looks like you are using an older version of the nginx config from the NC admin guide. It slightly changed over time and for newer NC version there were some modifications to it.

It seems you also use addtional parameters, so it is your decision if you want to simply use the nginx config from the admin guide and overwrite your current config completely or if you want to merge the configs:
https://docs.nextcloud.com/server/16/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of-nginx

The most important parts of the config regarding this issue you reported here, are these blocks, however:

    location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
        ...
    }

    location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
        try_files $uri/ =404;
        index index.php;
    }

Both blocks handle the ocm-provider folder.

Do I have to fix in gateway.conf or in nextcloud.conf?

For everybody who stumbles accross this issue and is curious about the solution …
We continued the talk outside of this forum to not clutter it with short messages. To summarize and provide an idea what solved the issue in the end:

2 Likes

@Schmu thanks for your help