# Nextcloud ocm-provider resolve error

**URL:** <https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740>\
**Category:** Troubleshooting\
**Tags:** nextcloud\
**Created:** [26 December 2023 15:51 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740 "2023-12-26T15:51:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![them](https://dietpi.com/forum/user_avatar/dietpi.com/them/32/7568_2.png) [@them](https://dietpi.com/forum/u/them)\
**Post date:** [26 December 2023 15:51 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/1 "2023-12-26T15:51:45Z")

</div>

I would like assistance with something that happens lately.

Default Nextcloud installation on my RPi 4 running DietPi v8.25.1 on Lighttpd and i have the following error in the “Security & setup warnings” tab in Nextcloud:

```auto
Your web server is not properly set up to resolve "/nextcloud/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.

```

Nextcloud updated fine and running **Nextcloud Hub 6 (27.1.5)** version.

My /var/www/nextcloud/.htaccess file regarding the ocm-provider settings are as follows:

```auto
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteCond %{HTTP_USER_AGENT} DavClnt
  RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  RewriteRule ^remote/(.*) remote.php [QSA,L]
  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]
  RewriteRule ^ocm-provider/?$ index.php [QSA,L]
  RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

```

Thank you

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [31 December 2023 11:58 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/2 "2023-12-31T11:58:38Z")

</div>

best to my knowledge Lighttpd don’t use a .htaccess file. Probably @MichaIng knows it better than I.

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [31 December 2023 12:08 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/3 "2023-12-31T12:08:40Z")

</div>

Yes, correct, lighttp does not support .htaccess.  
I use also lighttpd and Nextloud (but I’m on version 28.0.1) and I have not such an error.

The corresponding config file is at `/etc/lighttpd/conf-available/99-dietpi-nextcloud.conf` which has two lines for rewrites, one is for ocm provider:

```auto
	# Rewrites
	url.rewrite-once += (
		"^/nextcloud/remote/(.*)" => "/nextcloud/remote.php/$1",
		"^/nextcloud/ocm-provider($|/\?.*)" => "/nextcloud/index.php$1"
	)

```

Maybe it’s also worth to mentioned that I don’t run it on a subdomain, just a path like `mydomain.com/nextcloud`

---

<div class="post-metadata">

**Author:** ![them](https://dietpi.com/forum/user_avatar/dietpi.com/them/32/7568_2.png) [@them](https://dietpi.com/forum/u/them)\
**Post date:** [2 January 2024 13:28 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/4 "2024-01-02T13:28:11Z")

</div>

Hmm maybe then they have messed up something in Nextcloud and shows that error that it is actually means or affects nothing in my setup?

I checked the `/etc/lighttpd/conf-available/99-dietpi-nextcloud.conf` file and the are no Rewrites, only this seems relevant:

```auto
# Redirect OCM/OCS provider requests to Nextcloud endpoint:
url.redirect += (
        "^/.well-known/webfinger" => "/nextcloud/index.php/.well-known/webfinger",
        "^/.well-known/nodeinfo" => "/nextcloud/index.php/.well-known/nodeinfo"
)

```

Also i am still in v27.1.5 cause i am waiting for v28 to be offered naturally for upgrade.

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [2 January 2024 17:29 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/5 "2024-01-02T17:29:31Z")

</div>

I found this:

> Since 27.1.2 and 26.0.8 ocm-provider is not a dir anymore, but implemented in a usual Controller.

So before there was a folder in your nextcloud dir, but since the update the folder is removed and the feature is implemented as a controller, thus the rewrite is needed.

Probably you don’t need it if you don’t use OCM features.

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [12 January 2024 23:51 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/6 "2024-01-12T23:51:28Z")

</div>

Please try the new config. We did quite a bunch of changes with DietPi v8.24 and v8.25 to the Lighttpd Nextcloud config:

```sh
curl -sSfo /etc/lighttpd/conf-available/99-dietpi-nextcloud.conf 'https://raw.githubusercontent.com/MichaIng/DietPi/master/.conf/dps_114/lighttpd.nextcloud.conf'

```

We should update this config file with next DietPi update for everyone. I’ll do a commit for this.

EDIT: This should do it: [v9.0 · MichaIng/DietPi@49d0886 · GitHub](https://github.com/MichaIng/DietPi/commit/49d0886)  
I also changed the behaviour of reinstalls, to always install the new configs, and we will update them via `dietpi-update` whenever important changes are done from now one. There are also security-relevant changes by times, and sometimes mandatory ones, like for the newly used `mjs` files in Nextcloud.

---

<div class="post-metadata">

**Author:** ![them](https://dietpi.com/forum/user_avatar/dietpi.com/them/32/7568_2.png) [@them](https://dietpi.com/forum/u/them)\
**Post date:** [15 January 2024 13:04 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/7 "2024-01-15T13:04:27Z")

</div>

Thank you all, indeed i didn’t have the updated .conf file.

After updating as @MichaIng suggested, everything seem to work normal 🙂

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [14 April 2024 13:04 UTC](https://dietpi.com/forum/t/nextcloud-ocm-provider-resolve-error/18740/8 "2024-04-14T13:04:43Z")

</div>

Closed on 14 April 2024 13:04 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
