-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Your web server is not properly set up to resolve "/nextcloud/ocm-provider/" #40803
Comments
The error seems to be caused by this recent commit:
The new RewriteRule looks weird ( |
Cc @blizzz |
Someone else with subdir install noted the recent PR may have an oversight but I haven't looked deeper into it: |
Hey Everyone, Dumb question. Was the ocm-provider folder needed? I'm looking at the master branch (https://github.com/nextcloud/server) and the ocm-provider directory is not present or removed Dave |
Same warning here after updating v27.1.1 to v27.1.2. |
@PVasileff For Nginx, see nextcloud/documentation#11179 and nextcloud/documentation#11184 |
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: https://docs.nextcloud.com/server/25/admin_manual/installation/nginx.html?highlight=oc[ms]-provider In detail: reload or restart nginx That should do it for you (and nginx users in general) much luck! |
I also did an update from 27.1.1 to 27.1.2 and get this error. AddDefaultCharset utf-8 DO NOT CHANGE ANYTHING ABOVE THIS LINEErrorDocument 403 /index.php/error/403 |
Hey Everyone, I tried implementing the changes mentioned here from @Lawkss (#40794 (comment)) with a brand new install of Nextcloud v27.1.2 using Apache 2.4 Changes below: However, I'm still getting the warning message. Also, I'm using a path(domain.tld/nextcloud) for Nextcloud, as mentioned by @Lawkss This worksi But, this does not work |
Thanks. That works! |
I managed to remove the warning by adding the following to my Nextcloud .conf file:
|
Try this: #40818 (comment) |
This is not a solution at all, cause i use everytime after an Update Firefox in private Mode and get the Same Errors all over again! |
Oh boy, there was my problem! In german we would say "You don't see the forest, cause of all the trees" and this is quiet what happend. It seems to me, I used an very old apache-config. What was missing was the complete Directory-Node :( |
Manually updated config as described be ernolf for nginx, warning resolved |
That solution that @ivnmad suggested did the trick. Closing the ticket |
I needed to change the RewriteRule in addition to adding the Directory stanza to the Apache config. Is this really closed or does the .htaccess-file need a patch? |
I think, if you read carfully the manual again (e.g. apache and nginx config) and also all Rewrite-Rules, there is no need for a patch. |
Do you also have your nextcloud installation in a subdirectory? If yes, I would appreciate if you could point out which part of the documentation I may have missed. |
No, but it's a combination of the update of your webserver-config and .htaccess. |
For me this does not fix the issue: This is my nextcloud.conf:
|
My argument is that the RewriteRule should be written such that it works for both installations that are in / as well as in /nextcloud/, because you are not supposed to edit the rewrite rules as per a comment included in that very file, and that is why this issue is not resolved IMO. That in addition you need to edit the apache configuration is a separate point. |
Problem still exists in latest update. |
Hey Everyone, This question is for the Nextcloud developers and architects. I'm just wondering if the removing ocm-provider folder/directory and redirecting it to use index.php is short term solution or a permanent fix? Just want to say Thank You to the Nextcloud team for giving all of us a great product. |
The real issue is that all RewriteRule entries must produce relative instead of absolute URL paths, i.e. the leading slash is wrong in all of them. ("Relative" here really means "relative to the directory where the .htaccess file is".) You can verify this by trying curl -i https://your.host/path/to/nextcloud/.well-known/caldav, this will produce a wrong redirect URL. This patch fixes all of them, I've checked manually. See also first answer in https://stackoverflow.com/questions/21347768/what-does-rewritebase-do-and-how-to-use-it which explains better than the Apache docs what happens with absolute and relative redirect results. |
fix is in #40843 + backported, i.e. arrives with next maintenance releases. |
It looks like the .htaccess RewriteRule is not generic enough. It works for setups without a subfolder, but not when using a subfolder (i.e. nextcloud in accessed via https://domain.tld/nextcloud/). The original line is
which is an absolute rewrite rule. Any subfolder component would be lost, i.e. https://domail.tld/nextcloud/ocm-provider/, becomes https://domail.tld/index.php/ocm-provider/, rather than https://domail.tld/nextcloud/index.php/ocm-provider/ Changing the line above to
making it a relative substitution, will solve the issue provided you set the correct 'htaccess.RewriteBase' option in config/config.php and ran
|
Hi. Even if i try modifying .htaccess in nextcloud folder, it fails the overall check because there is no ocm-provider folder anymore, after today i updated to 27.1.2 I've noticed that in my previous backup folder of older nextcloud versions the ocm-provider folder exists. So i copied on of these "old" folders and now i have the "All checks passed" in Administration Settings. Hope it helps. |
Changing .htaccess works for me. Thanks! |
How to fix in Nginx? |
As mentioned by @ernolf #40803 (comment) Then reload config with |
Hello, |
@MattRGX - No see #40920 (comment) |
I don't have an ocm-provider folder after upgrade to 27.1.2. I do have an ocs-provider folder. I edited my .htaccess to remove the slash: RewriteRule ^ocm-provider/?$ /index.php [QSA,L] changed to: RewriteRule ^ocm-provider/?$ index.php [QSA,L] But I still get the error. EDIT: Same ocm-provider error in 27.1.3. EDIT2: Linking the ocs-provider directory to what I assume is the old location of ocm-provider fixes the error, ie. "ln - s ocs-provider ocm-provider" in the nextcloud installation directory |
In my case I think I had a malformed apache virtual host config. I no longer have the warning after changing .htaccess to: RewriteRule ^ocm-provider/(.*) /index.php [QSA,L] And adding these starred lines to my apache virtual host config:
(I have a Caddy SSL reverse proxy, so no SSL) Thanks all! |
That did the trick for me! Thanks a lot |
For anyone using Nginx Proxy Manager with Nextcloud being hosted on a sub-domain instead of a sub-folder I added the following lines to the 'Advanced' Tab: location = /ocs-provider {
try_files $uri $uri/ /index.php$request_uri;
}
location ~ ^/ocm-provider {
try_files $uri $uri/ /index.php$request_uri;
} |
Folder ocm-provider has been removed from Nextcloud since 27.1.2, which has been confirmed in another thread. |
I just updated to 27.1.4 and am also, yet again, getting the error message: Your web server is not properly set up to resolve "/nextcloud/ocm-provider/"...
|
I don't get the above error message, though I think my problem is related. I am on nextcloud aoi (running in docker). On "Checking for system and security issues." In the admin overview it says "All checks passed." My rewrite rule in the aoi-nextcloud container .htaccess is: However since the last update to Nextcloud AIO v7.9.0 / Nextcloud Hub 6 (27.1.5) I get the following and the system is slow as molasses (4 core i7, 32 gb ram, SSD storage):
Why is it trying to connect to 192.168.1.10? I have not configured that anywhere. Also the /nextcloud/ prefix seems weird. Any idea what could have gone wrong here? Can also start a new issue if this one is significantly different. |
@ulno Your matter appears unrelated. I suggest posting over at the Nextcloud Help Forum - https://help.nextcloud.com - since it also appears to likely be a configuration matter. |
For reference, if someone lands here, I re-posted my problem here: https://help.nextcloud.com/t/nextcloud-aoi-update-to-nextcloud-hub-6-27-1-5-introduces-ocm-provider-issues-and-uses-undefined-ip-192-168-1-10/178100 |
its doesn't work for me. : (
|
@Uncert Compare your config to the actual documented one. Yours does not match: https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html Please follow-up at the help forum - https://help.nextcloud.com - for further troubleshooting since this is not a bug. |
I don't think the problem is that the pattern is incorrect. It's a correct pattern, the
So it looks like the developer meant for this to only work if there are no query parameters, etc, which might be correct, depending on what an ocm-provider route is supposed to do. I think the "root" issue here is that this pattern assumes nextcloud is installed at root and not in a subfolder. |
Bug description
Ever since I updated the latest version of NextCloud from v27.1.1 to v27.1.2 using the Updater, I get the following warning message in the Administration Overview page
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.
Steps to reproduce
Expected behavior
Should be receiving no warning messages after an update
Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
27
Operating system
Other
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 22.1 to 22.2)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
Looking at the Nextcloud Server Repo (https://github.com/nextcloud/server), it looks like ocm-provider folder. My solution was the following:
The text was updated successfully, but these errors were encountered: