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

  • Linux Debian 6.1.0
  • PHP Version 8.2.7
  • Apache 2.4.57

No error message before upgrade.
Now showing: Your web server is not properly set up to resolve “/ocm-provider/”.
Everything seems to be working normally, but it is annoying.
New .htaccess contains RewriteRule ^ocm-provider/?$ /index.php [QSA,L]
Tested various solutions found here and in other places, but nothing seems to work.

4 Likes

I have the same problem, so following

For nginx users:

Nginx does not make use of .htaccess files, so you have to edit it by hand anyway. If you have chosen for nginx as webserver, you should read the manual if anything had changed after each update and change it yourself…

→ Old config (highlight=oc[ms]-provider) ← vs → New config (highlight=ocs-provider) ←

In detail:
Search for this re-string:
oc[ms]-provider
in your nginx configfile and replace it by this string:
ocs-provider

reload or restart nginx

That should fix it for you.

much luck!

3 Likes

This is the issue:

You can search for this string: /(ocm-provider|ocs-provider|updater)/ and replace it by this one: /(ocs-provider|updater)/ if it still exists.

or simply run this sed command, that does the same:

sudo -u www-data sed -i 's/ocm-provider|//' /path/to/your/nextcloud/.htaccess

much luck.
ernolf

Hi @ernolf , thank you for the info.
I removed RewriteRule ^ocm-provider/?$ /index.php [QSA,L] from .htaccess.
You did mentioned a second step, but I don’t have a line with /(ocm-provider|ocs-provider|updater)/ in my .htaccess,
I’'m therefore still getting the warning.

oh I’m sorry about that. Then unfortunately I can’t help any further for the time being. The message didn’t even appear for me because I had already set everything up before the update and I do not use .htaccess for the sake of performance, so all my directory based config is in apache2 configfile.

Maybe it’s a caching thing too. Time will show.

much luck anyway!

1 Like

Following the upgrade the ocm-provider folder was deleted.
I presume that folder is no longer needed, but somehow there is a link to it somewhere.
I downloaded 27.1.1 and copied the ocm-provider folder inside my 27.1.2 installation and the warning disappears, as also described in the bug report…
I’'ll leave the warning on [see I’ve deleted the ocm-provider folder I had manually copied], so that I can monitor what happens with the next upgrade.
@ernolf thank you again.

1 Like

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}"  https://my.cloud/(subfolder/)ocm-provider && echo
200
root@server~# curl -Ls https://my.cloud/ocm-provider | jq
{
  "enabled": true,
  "apiVersion": "1.0-proposal1",
  "endPoint": "https://my.cloud/ocm",
  "resourceTypes": [
    {
      "name": "file",
      "shareTypes": [
        "user",
        "group"
      ],
      "protocols": {
        "webdav": "/public.php/webdav/"
      }
    }
  ]
}

ernolf

1 Like

Without the copied folder I get “Not Found”

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

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://mynextcloud/ocm-provider/">here</a>.</p>
<hr>
<address>Apache/2.4.57 (Debian) Server at mynextcloud</address>
</body></html>

and this with the browser:

enabled true
apiVersion 1.0-proposal1
endPoint https://mynextcloud/index.php/ocm
resourceTypes
0
name file
shareTypes
0 user
1 group
protocols
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
</IfModule>

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

meine-nextcloud.de/index.php/ocm-provider/
aber die Meldung nicht weg bekommen

Lösung
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
hinzugefügt

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

service apache2 restart
Meldung ist weg

Gruß

Markus

3 Likes

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]
to:
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;
}

so

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

was my solution hopes it helps

1 Like