Problem about resolving "/ocm-provider/"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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): 28.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 12.4
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.24.0
PHP version (eg, 7.4): 8.2.14

The issue you are facing:

  • Your web server is not properly set up to resolve “/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 :arrow_upper_right:. On Nginx those are typically the lines starting with “location ~” that need an update.

Is this the first time you’ve seen this error? (Y):

Steps to replicate it:

  1. Install nextcloud.
  2. Change the nginx configuration file.

The output of your Nextcloud log in Admin > Logging:

My logging page is blank

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => '****',
  'passwordsalt' => '****',
  'secret' => '****',
  'maintenance_window_start' => 1,
  'default_phone_region' => 'CN',
  'trusted_domains' => 
  array (
    0 => '****:2021',
  'datadirectory' => '/home/ncdata',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://****:2021',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '****',
  'installed' => true,
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  '' => 'stable',
  'appstoreenabled' => true,
  'appstoreurl' => 'Nextcloud',
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\HEIC',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\TXT',
    8 => 'OC\\Preview\\MarkDown',
    9 => 'OC\\Preview\\Movie',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauth' => 1,
  'mail_from_address' => '****',
  'mail_domain' => '****',
  'mail_smtphost' => '****',
  'mail_smtpport' => '587',
  'mail_smtpname' => '****',
  'mail_smtppassword' => '****',

The output of your Apache/nginx/system log in /var/log/____:
https://***/nextcloud/ocm-provider show “404 not found”.

GET /nextcloud/ocm-provider HTTP/2.0" 404 548 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36"

There is
rewrite ^/(?!index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|ocs-provider\/.+|.+\/richdocumentscode\/proxy) /index.php$request_uri;
in my nginx config.

And RewriteRule ^ocm-provider/?$ index.php [QSA,L] in .htaccess.

Your log entry indicates a sub-directory installation of Nextcloud, whereas your provided Nginx configuration appears to not be the sub-directory installation version of the Nginx config. Please check the sub-directory configuration in the docs and use it: