With Nextcloud update: “Not properly set up to resolve “/ocm-provider/” and “/ocs-provider/” on NGINX server

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5) : **Nextcloud 28.0.1
Operating system and version: Ubuntu 22.04.4 LTS
Apache or nginx version: nginx/1.18.0 (Ubuntu)
PHP version: PHP 8.1.2-1ubuntu2.11 (cli) (NTS)

The issue you are facing:
I’ve just updated my NextCloud installation to 28.0.1 and have encountered an issue. This is what I see in settings/overview warnings:

  • The web server is not properly configured to resolve the path “/ocm-provider/”. This is most likely due to the web server configuration not being updated to access this folder directly. Compare your configuration with the supplied Apache .htaccess rewrite rules or those provided in the Nginx documentation on the documentation page :arrow_upper_right:. Nginx usually needs to update the lines that start with “location ~”.
  • The web server is not properly configured to resolve the path “/ocs-provider/”. This is most likely due to the web server configuration not being updated to access this folder directly. Compare your configuration with the supplied Apache .htaccess rewrite rules or those provided in the Nginx documentation on the documentation page :arrow_upper_right:. Nginx usually needs to update the lines that start with “location ~”.
    Is this the first time you’ve seen this error? (Y/N): Yes

Config location: /etc/nginx/sites-available/nextcloud
Nextcloud web-files location: /var/www/html/nextcloud

we use nginx proxy manager

here my nextcloud conf

upstream php-handler {
server unix:/var/run/php/php8.1-fpm.sock;
}

upstream netdata {
    server 127.0.0.1:19999;
    keepalive 64;
}

server {
listen 80;
listen [::]:80;
server_name oficina.accedde.mx;


# Add headers to serve security related headers
add_header Strict-Transport-Security "max-age=15552000";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag "noindex, nofollow" always;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
add_header Referrer-Policy "no-referrer";
add_header X-Frame-Options "SAMEORIGIN";
root /var/www/html/nextcloud/;

location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
#inicio

location = /.well-known/webfinger {
return 301 $scheme://$host:$server_port/index.php/.well-known/webfinger;
}
location = /.well-known/nodeinfo {
return 301 $scheme://$host:$server_port/index.php/.well-known/nodeinfo;
}

#fin

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

   location ~ /netdata/(?<ndpath>.*) {
        proxy_redirect off;
        proxy_set_header Host $host;

        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_pass_request_headers on;
        proxy_set_header Connection "keep-alive";
        proxy_store off;
        proxy_pass http://netdata/$ndpath$is_args$args;

        gzip on;
        gzip_proxied any;
        gzip_types *;
    }
client_max_body_size 100G;
fastcgi_buffers 64 4K;

gzip on;
gzip_vary on;
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

location / {
rewrite ^ /index.php$uri;
}

location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}


location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
#Avoid sending the security headers twice
fastcgi_param modHeadersAvailable true;
fastcgi_param front_controller_active true;
fastcgi_pass php-handler;
fastcgi_intercept_errors on;
fastcgi_request_buffering off;
}


location ~ ^/(?:updater|oc[ms]-provider)(?:$|/) {
    try_files $uri/ =404;
    index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param front_controller_active true;
    fastcgi_pass php-handler;
    fastcgi_intercept_errors on;
    fastcgi_request_buffering off;
}


location ~ \.(?:css|js|woff|svg|gif)$ {
try_files $uri /index.php$uri$is_args$args;
add_header Cache-Control "public, max-age=15778463";
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
access_log off;
}

location ~ \.(?:png|html|ttf|ico|jpg|jpeg)$ {
try_files $uri /index.php$uri$is_args$args;
access_log off;
}

 location ~ \.woff2?$ {
        try_files $uri /index.php$request_uri;
        expires 7d;         # Cache-Control policy borrowed from `.htaccess`
        access_log off;     # Optional: Don't log access to assets
    }

}

What should I change in my nextcloud.conf to fix the warning issues?

The answer is in the warning message:

You’ll note your config is out of date:

https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html

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