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

nc15
#21

Adding this to /etc/apache2/sites-available/nextcloud.conf

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

and restarting apache also worked for me.
Thank you all!

2 Likes

#22

Your tip saved my day. Hope, that the Nextcloud boys and girls are reading this, too.

0 Likes

#23

I put your lines here

    location = /nextcloud/.well-known/caldav {
                return 301 $scheme://$host/nextcloud/remote.php/dav;
        }

    location /.well-known/acme-challenge { }

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

    location ^~ /nextcloud {
    ...

But the warnings persist. Is this the right spot?
Or are your lines meant to be inserted in addition so something else?

0 Likes

#24

That looks good.
Did you tell nginx to reload the configuration?

nginx -s reload
0 Likes

#26

That looks good.
Did you tell nginx to reload the configuration?

nginx -s reload

yes, I did.

I should probably mention that I use nginx as a reverse proxy, so everything Nextcloud gets redirected to 127.0.0.1:82 and this is where this configuration takes over. (I don’t know it this matters, just to prevent a “you should have said that earlier”)

0 Likes

#27

Instead of sending the client a redirect, I just created aliases for these two paths.
I already had in my apache conf:
Alias /nextcloud "/var/www/nextcloud/"

So now I also have:
Alias /ocm-provider “/var/www/nextcloud/ocm-provider/”
Alias /ocs-provider “/var/www/nextcloud/ocs-provider/”

And that too seems to have cleared this error.

1 Like

#28

Hello Bernie_O,

I have added exactly your lines into my nextcloud.conf file (located in /etc/nginx/conf.d/), so now I have this:

# The following rule is only needed for the Social app.
# Uncomment it if you're planning to use this app.
# rewrite ^/.well-known/webfinger /nextcloud/public.php?service=webfinger last;

location = /.well-known/carddav {
    return 301 $scheme://$host/nextcloud/remote.php/dav;
}

location = /.well-known/caldav {
    return 301 $scheme://$host/nextcloud/remote.php/dav;
}

location /.well-known/acme-challenge { }

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

location ^~ /nextcloud {

    # set max upload size
    client_max_body_size 10240M;
    # turns out the optimization conf already set the fast buffer size so I just nixed that from my conf
    #fastcgi_buffers 64 4K;

but the warning message on the WebUI is still there.

Any other idea? Where I am wrong?

Thank you very much.
Omar

0 Likes

#29

NOT solved! I have no /etc/httpd/conf.d - nobody in this thread has addressed my issue. I am running NextCloud on a Synology DS218+ NAS. Who marks these threads as ‘solved’?

0 Likes

#30

Merci, pour la solution, plus de message :slight_smile:

0 Likes

#31

I have restored 15.0.4. I know NextCloud is effectively free, but I am very concerned that no support is available for those of us running it on a Synology NAS. I’m really not sure what to do - I want to host my own calendar and contacts but my options are not good. I’d love to carry on with NextCloud but nobody is able to help me when there are problems. Is the latest version of OwnCloud having similar updating problems?

0 Likes

#32

Hi scgf,

I am well versed in Linux applications and the terminal and I once tried to help a friend install on a QNAP device. After several hours I had to throw in the towel because the NAS community is rather small and fragmented and I wasn’t able to make heads or tails of their proprietary infrastructure.

I’d recommend spinning up a VM on a bare metal box or on a cloud provider such as DigitalOcean or AWS. Cloud cost is cheap, you have access to root and the system is highly configurable. If you want assistance I can point you in the right direction as I’ve built Nextcloud applications on both systems in the last week.

Message me directly if you want to run through the basics.

Paul

0 Likes

#33

Thank very much you Paul. I upgraded my NAS to the DS218+ just because of the memory upgrade capability and how well it runs NextCloud :frowning: NextCloud runs so well on it - even the 15.0.5 update - apart from the error messages in my original post. Everything works, and calendar and contacts are just perfect. I just don’t like seeing error messages I can do nothing about. I have upgraded several times since I installed version 14 and this is the first time I have seen such errors. I have restored 14.0.4 which shows no errors and I’ll stick with that for a while and look around for an alternative.

0 Likes

#34

Afaik, Synology uses an extremely customized Linux with non-standard system pathes etc.,
therefore it is more than unrealistic that you find help in a Nextcloud forum. Most likely you
should ask such Synology specific questions in a Synology help forum or ask aunt G. for
an answer.
If you want to run Nextcloud some specific requirements need to be fulfilled in advance
by the system administrator. He needs to know how to set-up it on the used environment.
That is not part of Nextcloud. I would expect that you will run into this kind of trouble with
all kind of other web applications, including ownCloud :wink:

1 Like

#35

Would using Docker help? My NAS can run Docker . .

0 Likes

#36

Personally I’m not using Docker images but I would expect that it is a good way to get rid of
Synology specific settings, because the Nextcloud Docker images seems to be widely used.

0 Likes

#37

Hi All, using Apache here, I put the following in my .htaccess file

Redirect 301 /ocm-provider/ /cloud/ocm-provider/
Redirect 301 /ocs-provider/ /cloud/ocs-provider/
ErrorDocument 403 /cloud/
ErrorDocument 404 /cloud/

However is still doesn’t work. Any idea’s?

0 Likes

#38

Same messages here, tried a lot but i cannot solve it

nextcloud on a apache2 vm in /var/www/html/ncloud
nginx reverse proxy on its own vm

But if i open “https://mydomain.de/ncloud/ocs-provider/” or “https://mydomain.de/ncloud/ocm-provider/” i get results for both urls?

{“enabled”:true,“apiVersion”:“1.0-proposal1”,“endPoint”:“https://mydomain.de/ncloud/index.php/ocm",“resourceTypes”:[{“name”:“file”,“shareTypes”:[“user”,“group”],“protocols”:{“webdav”:"/public.php/webdav/”}}]}

AND

{“version”:2,“services”:{“PRIVATE_DATA”:{“version”:1,“endpoints”:{“store”:"/ocs/v2.php/privatedata/setattribute",“read”:"/ocs/v2.php/privatedata/getattribute",“delete”:"/ocs/v2.php/privatedata/deleteattribute"}},“SHARING”:{“version”:1,“endpoints”:{“share”:"/ocs/v2.php/apps/files_sharing/api/v1/shares"}},“FEDERATED_SHARING”:{“version”:1,“endpoints”:{“share”:"/ocs/v2.php/cloud/shares",“webdav”:"/public.php/webdav/",“shared-secret”:"/ocs/v2.php/cloud/shared-secret",“system-address-book”:"/remote.php/dav/addressbooks/system/system/system",“carddav-user”:“system”}},“ACTIVITY”:{“version”:1,“endpoints”:{“list”:"/ocs/v2.php/cloud/activity"}},“PROVISIONING”:{“version”:1,“endpoints”:{“user”:"/ocs/v2.php/cloud/users",“groups”:"/ocs/v2.php/cloud/groups",“apps”:"/ocs/v2.php/cloud/apps"}}}}

0 Likes

#39

I followed the instruction (for NC in subdir, nginx) like described in the security warning. But the same message again…

0 Likes

#40

For apache edit your site config at /etc/apache2/sites-available/<your site name>.conf and add the following to your VirtualHost.

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^/ocm-provider     /<your subdir name>/ocm-provider/     [R=301,L]
    RewriteRule ^/ocs-provider     /<your subdir name>/ocs-provider/     [R=301,L]
</IfModule>

Adding anything to your .htacces won’t help if you have NC installed in a subdir.

2 Likes

#41

Same here with nextcloud using nginx, but I’ve tried rewrite and alias but the error persists

0 Likes