Your web server is not properly set up to resolve "/ocm-provider/"

I’ve just updated my NextCloud installation from 15.0.4 to 15.0.5 and have encountered an issue. This is what I see in settings/overview:

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.

I get another similar message about /occ-provider/

I run NextCloud on my Synology DS218+ NAS - a direct install, not a docker or snap image. I’ve looked at the configuration documentation but it doesn’t relate to my Diskstation installation at all.

I did not get these errors when I upgraded to 15.0.4.

Can anyone help me to rectify the problem, please? Thank you!

Phillip

I had the same problem. I suppose you are running nextcloud in a subdirectory of webroot (like I am)?

If yes: adding these lines to your nginx configuration right after the location blocks with the /.well-known/[...] redirects made the warning in the admin page disappear (replace [NEXTCLOUD] with the subdirectory where nextcloud resides):

location ~ /(ocm-provider|ocs-provider)/ {
    return 301 $scheme://$host/[NEXTCLOUD]/$1/;
}

Don’t forget to tell nginx to reload the changed configuration afterwards with:
nginx -s reload

1 Like

Thank you. Where is the nginx configuration file? I see the .htaccess file, but it has a warning ‘do not change anything above this line’ right near the end of the file.

Thank you!

How did you install nextcloud?
Usually it is under /etc/nginx/sites-available/

Actually: do you use Apache or nginx? I supposed nginx because the link you posted brought me to the nginx documentation page, but you didn’t write it.

These are the instructions I followed and NextCloud has been working perfectly up to 15.0.5. It still works, but I am concerned at the messages I referenced in my post.

In /etc/nginx I have ‘sites-enabled’ which is an empty directory. No ‘sites-available’.

That tutorial is installing apache 2.4. I am sorry, I can‘t help then, since I don‘t know enough about apache Webserver.
But I am sure someone else with apache knowledge will jump in soonish.

Thank you Bernie_O. Very kind of you to try and help.

I can confirm the same error-message after updating to 15.0.5.
Nextcloud is installed in an subfolder of root, running with apache2 and mariadb on raspbian stretch.
And is still running without any other problems - afaik.
I guess .htaccess (in root) must be altered in some way, but as newbie i have no clue.

Same here?

Same here! Fedora server 29, Apache (httpd-2.4.38), PHP(7.2.15) upgrade to 15.0.5 from 15.0.4

On Fedora server 29, Apache (httpd-2.4.38), PHP(7.2.15) upgrade to 15.0.5 from 15.0.4. I solved the error by adding the following line in the file < file-nextcloud >.conf in the folder /etc/httpd/conf.d

Redirect 301 /ocm-provider https://< name server > / < folder nextcloud install > / ocm-provider
Redirect 301 /ocs-provider https://< name server > / < folder nextcloud install > / ocs-provider

do not put the spaces, they are only for this edition…

1 Like

Good work for me.

Tested on Also

Redirect 301 /ocm-provider/ /nx/ocm-provider/
Redirect 301 /ocs-provider/ /nx/ocs-provider/

I writers on .htaccess root
And work for me,

/nx/ is folder on My nextcloud

1 Like

Same here SharedHosting Apache PHP 7.2.3 upgrade to 15.0.4 from 15.0.5.

Thanks to gus and Tiger for a solution :clap:
Because of no access to /etc/httpd/conf.d (SharedHosting) it works for me to put into my .htaccess in the webroot:
Redirect 301 /ocm-provider /< FolderNextclouInstall >/ocm-provider
Redirect 301 /ocs-provider /< FolderNextclouInstall >/ocs-provider

Works for me too …

why don`t the nextcloud developers pay more attention to shared enviroments? I guess most of the people have have nextcloud installed on a shared webspace…

3 Likes

I dropped the following into the end of my /etc/apache2.conf file and all good now.

Redirect 301 /ocm-provider/ /nextcloud/ocm-provider/
Redirect 301 /ocs-provider/ /nextcloud/ocs-provider/

Thanks guys!

3 Likes

As the OP I am increasingly confused. My instance of Nextcloud is running on a Synology DS218+ NAS and none of these locations seem to make sense in my install. I’ve put the redirect commands all over the place to no avail. In the past I’ve had a couple of issues and it’s like I am the only person ever to be running Nextcloud on a Diskstation. The Synology communities claims not to have a clue, neither do the Nextcloud communities and each refers me back to the other - so I am between the devil and the deep blue sea. I’ve even been looking for some alternative to Nextcloud which might be better supported on a Synology NAS - but I am yet to find anything. I need Calendar and Contacts (with user pics) - not too bothered about files. There must be someone out there who can help?

Hi Bernie_O,

I am also using nginx and nextcloud running in a subdirectory.

I have added the following lines in my nextcloud.conf:

    location ~ ^\/nextcloud\/(?:updater|ocs-provider|ocm-provider)(?:$|\/) {
        return 301 $scheme://$host/nextcloud/$1/;
        #return 301 https://$server_name$request_uri;
        try_files $uri/ =404;
        index index.php;
    }

but I have always the same warning.

Where I am wrong?
Thank you in advance.
Omar

Worked!

PHP Version 7.1.26-1+ubuntu18.04.1+deb.sury.org+1
NC in /var/www/nextcloud

Can you see the difference?
You need to point from the root to the subfolder. My location block does this - your location doesn’t.
Undo your changes (they break ocs/m-provider completely!) and add my location block right after the location blocks with the .well-known/[...] redirects.