Your web server is not properly set up to resolve "/ocm-provider/". following upgrade to 27.1.2

Do you get the json object when you call it in a browser or checked the response code with curl:

root@server~# curl -sIo /dev/null -w "%{http_code}" && echo
root@server~# curl -Ls | jq
  "enabled": true,
  "apiVersion": "1.0-proposal1",
  "endPoint": "",
  "resourceTypes": [
      "name": "file",
      "shareTypes": [
      "protocols": {
        "webdav": "/public.php/webdav/"


1 Like

Without the copied folder I get “Not Found”

If I copy the folder from the old version, I get this with curl:

<title>301 Moved Permanently</title>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://mynextcloud/ocm-provider/">here</a>.</p>
<address>Apache/2.4.57 (Debian) Server at mynextcloud</address>

and this with the browser:

enabled true
apiVersion 1.0-proposal1
endPoint https://mynextcloud/index.php/ocm
name file
0 user
1 group
webdav /public.php/webdav/

OK, that is a normal redirect, with the -L flag, curl behaves like a normal browser would do and follows the redirection. :wink:

Moin to all try to have a look on this treat First RC of Nextcloud 27.1.2 - #47 by Joern_Kenntnisreich there is your Solution.

I can confirm that worked for me as well.
I posted that here yesterday, but somehow it’s not showing in the thread.
I add the following to my Nextcloud .conf file:

<Directory /var/www/html/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews

<IfModule mod_dav.c>
  Dav off

Works for me!

1 Like

Hallo Zusammen,
Bei mir hat auch nichts von oben funktiniert.
Jetzt habe ich die Meldung weg bekommen
habe aber keine Ahnung ob die Lösung richtig ist.
Aber vielleicht hilft meine Lösung bei anderen wo die Meldung auch nicht weg geht.

hier meine Lösung
Für alle die die json datei überdie URL angezeigt bekommen
aber die Meldung nicht weg bekommen

In der Datei
nano /var/www/nextcloud/.htaccess
wurde nach der Installation auf 27.0.2 folgende Zeile hinzugefügt
Die habe ich nicht geändert
RewriteRule ^ocm-provider/?$ index.php [QSA,L]

Ich habe in der ssl config von apache wo meine anderen Redirects stehen folgende Zeile

nano /etc/apache2/sites-enabled/default-ssl.conf
Redirect 301 /ocm-provider/ /index.php/ocm-provider/

service apache2 restart
Meldung ist weg




Cruising through the duplicated bug reports on Github, the following instructions did the trick for me

I had the same issue after upgrading to 27.1.2.

My installation is in domain.tld/nextcloud. The .htaccess changes in #40745 redirect ocm-provider to /index.php, which doesn’t exist.

Changing that line in .htaccess from:
RewriteRule ^ocm-provider/?$ /index.php [QSA,L]
RewriteRule ^ocm-provider/?$ index.php [QSA,L]
resolved the issue for me, and all checks now pass on the admin page.

Danke @Freeman1982 . it Works for me.

Danke, das ist die erste Lösung die bei mir funktioniert hat!

thank youuuuu MVP

Thanks, changing the rewrite rule worked for me as well.

1 Like

for me nothig worked so far and by pure luck i edited my config in npm for my apache NC and it looks like

location /.well-known/carddav {
    return 301 $scheme://$host/remote.php/dav;
location /.well-known/caldav {
    return 301 $scheme://$host/remote.php/dav;
location /.well-known/webfinger {
    return 301 $scheme://$host/index.php/.well-known/webfinger;
location /.well-known/nodeinfo {
    return 301 $scheme://$host/index.php/.well-known/nodeinfo;
location /ocm-provider {
    return 301 $scheme://$host/index.php/ocm-provider;


location /ocm-provider {
    return 301 $scheme://$host/index.php/ocm-provider;

was my solution hopes it helps

1 Like

Thank you!

Changing nginx config in this way resolved the issue for me.

For me also still the same error messages for /ocm-provider/ & /ocs-provider/ - also after update to current NC 27.1.3 - for me with ngnix & php 8.2.
I tried all the suggested ideas, nothing helps - please solve this bug … never had problems before with that.

Nothing helps and nothing will help, until this issue will be addressed on a Nextcloud side.
The matter of fact is that the folder ‘ocm-provider’ has been removed from Nextcloud installation, I believe with 27.1.2 update. But forwarding rule and check for this folder still exists, even in 27.1.4.
No matter how you edit your web server forwarding rule - it won’t work, because there is no such folder as ‘ocm-provider’ anymore. The only way to get rid of this error is to wait until Nextcloud team will address this issue and remove such check from admin page in further Nextcloud update.
I hope it will be fixed in 27.1.5, but we’ll see.

Hmmm, so all those users who no longer get the warning, or never got it in the first place, must be doing something wrong.

1 Like

For me the problem is back since update form 27.1.3 to 27.1.4. Now I get warnings again.
Before that I could solve it with the rewrite rule in .htaccess: ^ocm-provider/?$ /index.php [QSA,L]
Now nothing seams to work. I tried all possible kinds of rewrite rules. But if I go on “” it looks good and it says enabled = true.

1 Like

I’ve tried every single way suggested.
.httaccess, Apache config, etc.
No luck.
But when I put ‘ocm-provider’ folder back from my old backup - boom, no warning anymore.
What am I doing wrong?:man_shrugging:t2:

How are we supposed to know if we don’t know your exact configuration?

If you are using Apache, the .htaccess file that is included in the Nextcloud folder should take care of this and it should also be updated automatically during a Nextcloud upgrade. If this didn’t work for some reason, you can update the .htaccess file manually with the occ maintenance:update:htaccess command.

Also, your Apache VirtualHost must contain the following section in order for .htaccess. files to work: (Path to your Nextcloud folder may need to be adjusted)

<Directory /var/www/html/nextcloud/>
     Require all granted
     AllowOverride All
     Options FollowSymLinks MultiViews

     <IfModule mod_dav.c>
       Dav off

If that doesn’t help, please open a new thread and fill out the support template, unless you want to keep trying random things that people post here.