Overwrite.cli.url warning given even though "overwrite.cli.url" is correctly set

`"Security and Setup warnings is giving the following message: Please make sure to set the “overwrite.cli.url” option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: “https://public.url.net”. Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)

However, ‘overwrite.cli.url’ is set accurately. The whole setup is behind an Apache reverse proxy."`

Nextcloud version (eg, 20.0.5): 25.0.3
Operating system and version (eg, Ubuntu 20.04): TOS 5.1.24
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): 8.1

The issue you are facing:

Security and Setup warnings is giving the following message: Please make sure to set the “overwrite.cli.url” option in your config.php file to the URL that your users mainly use to access this Nextcloud. Suggestion: “https://public.url.net”. Otherwise there might be problems with the URL generation via cron. (It is possible though that the suggested URL is not the URL that your users mainly use to access this Nextcloud. Best is to double check this in any case.)

However, ‘overwrite.cli.url’ is set accurately. The whole setup is behind an Apache reverse proxy.

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

Steps to replicate it:

  1. Upgrade to Nextcloud 25
  2. Log on with Administrator
  3. Access Administration settings

The output of your Nextcloud log in Admin > Logging:

Contains data too complex to anonymise before posting.

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

<?php
$CONFIG = array (
  'instanceid' => '***',
  'passwordsalt' => '***',
  'datadirectory' => '/***/nextcloud/data',
  'version' => '25.0.3.2',
  'dbtype' => 'mysql',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbname' => '***',
  'dbuser' => '***',
  'dbpassword' => '***',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '127.0.0.1',
    'port' => 6379,
  ),
  'installed' => true,
  'default_language' => 'en',
  'default_locale' => 'en_GB',
  'defaultapp' => 'dashboard,files',
  'knowledgebaseenabled' => true,
  'allow_user_to_change_display_name' => true,
  'remember_login_cookie_lifetime' => 1296000,
  'auth.bruteforce.protection.enabled' => true,
  'mail_domain' => '***',
  'mail_smtpmode' => 'smtp',
  'mail_smtphost' => '***',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpname' => '***',
  'mail_smtppassword' => '***',
  'theme' => '',
  'default_phone_region' => 'GB',
  'loglevel' => 2,
  'maintenance' => false,
  'trusted_domains' =>
  array (
    0 => 'local.network.url:httpsport',
    1 => 'local.network.url:httpport',
    2 => 'public.url',
  ),
  0 =>
  array (
    'trusted_proxies' => 'reverse.proxy.local.ip',
    'overwritehost' => 'public.url.net:443',
    'overwriteprotocol' => 'https',
    'overwritewebroot' => '/',
    'overwrite.cli.url' => 'https://public.url.net/',
   #'overwrite.cli.url' => 'https://localhost:31443',
    'htaccess.RewriteBase' => '/',
    'ProxyPreserveHost' => 'On',
  ),
  'forwarded_for_headers' =>
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
    1 => 'HTTP_X_FORWARDED',
  ),
  'secret' => '***',
  'mail_from_address' => 'admin',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
);

The output of your Apache/nginx/system log in /var/log/____:

[Sun Mar 26 03:06:23.706368 2023] [ssl:warn] [pid 27847] AH01909: local.ip:port:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 26 03:06:24.003893 2023] [ssl:warn] [pid 27849] AH01909: local.ip:port:0 server certificate does NOT include an ID which matches the server name
[Sun Mar 26 03:06:24.250316 2023] [mpm_prefork:notice] [pid 27849] AH00163: Apache/2.4.53 (Unix) OpenSSL/1.1.1i PHP/8.1.13 configured -- resuming normal operations
[Sun Mar 26 03:06:24.250454 2023] [core:notice] [pid 27849] AH00094: Command line: '/usr/local/apache24/sys/bin/httpd -f /home/sanctimon/MOD_CONFIG/Nextcloud_okm/httpd.conf'
[Sun Mar 26 03:06:56.811370 2023] [php:warn] [pid 27905] [client 192.168.7.98:40308] PHP Warning:  Unknown: POST Content-Length of 40806180 bytes exceeds the limit of 33554432 bytes in Unknown on line 0
[Sun Mar 26 03:06:56.944788 2023] [php:warn] [pid 27914] [client 192.168.7.98:40312] PHP Warning:  Unknown: POST Content-Length of 52154076 bytes exceeds the limit of 33554432 bytes in Unknown on line 0
[Sun Mar 26 15:35:32.096494 2023] [php:warn] [pid 15039] [client 192.168.7.98:34500] PHP Warning:  Unknown: POST Content-Length of 40806180 bytes exceeds the limit of 33554432 bytes in Unknown on line 0
[Sun Mar 26 18:41:04.494815 2023] [php:warn] [pid 28254] [client 192.168.7.98:40010] PHP Warning:  Unknown: POST Content-Length of 40806180 bytes exceeds the limit of 33554432 bytes in Unknown on line 0