.well-known redirection not working in Raspberry Pi

I’ve made a fresh install of Nextcloud 19 in my old Raspberry Pi 2. It is working fine, but I haven’t been able to get rid of the .well-known warnings in setup page. I know this topic has been covered several times in this forum, but none of the suggestions I’ve found has made the trick.

Nextcloud version (eg, 18.0.2): 19,0.0
Operating system and version (eg, Ubuntu 20.04): Raspberry Pi OS 32bit May 2020
Apache or nginx version (eg, Apache 2.4.25): 2.4.38-3+deb10u3
PHP version (eg, 7.1): 7.3

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

Steps to replicate it:

  1. Go to Admin settings > Overview
  2. The warnings about carddav and calddav are there

The output of your Nextcloud log in Admin > Logging:

There are no messages related to this.

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

<?php
$CONFIG = array (
  'instanceid' => 'XXXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXXX',
  'trusted_domains' => 
  array (
    0 => '192.168.1.33',
    1 => 'polkillas.ddns.net',
  ),
  'datadirectory' => '/media/sda2/nube',
  'dbtype' => 'mysql',
  'version' => '19.0.0.12',
  'overwrite.cli.url' => 'http://192.168.1.33/nube',
  'dbname' => 'NAME',
  'dbhost' => 'localhost',
  'dbport' => 'XXX',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'USER',
  'dbpassword' => 'PASSWORD',
  'installed' => true,
  'maintenance' => false,
  'htaccess.RewriteBase' => '/nube',
);

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

Log content
79.145.180.149 - - [11/Jul/2020:17:14:20 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - polkillas [11/Jul/2020:17:14:21 +0200] "PROPFIND /nube/remote.php/dav/files/polkillas/M%C3%BAsica/Extremoduro/08%20Canciones%20prohibidas%20(1998) HTT$
79.145.180.149 - polkillas [11/Jul/2020:17:14:21 +0200] "PROPFIND /nube/remote.php/dav/files/polkillas/M%C3%BAsica/Extremoduro/09%20Yo,%20minoria%20absoluta%20(2002) H$
79.145.180.149 - polkillas [11/Jul/2020:17:14:22 +0200] "PROPFIND /nube/remote.php/dav/files/polkillas/M%C3%BAsica/Extremoduro/10%20Canciones%20sin%20voz%20(2004) HTTP$
79.145.180.149 - - [11/Jul/2020:17:14:29 +0200] "GET /remote.php/dav/ HTTP/1.1" 404 4332 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/7$
79.145.180.149 - - [11/Jul/2020:17:14:37 +0200] "GET /.well-known/carddav HTTP/1.1" 404 1156 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:14:38 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:14:51 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:14:50 +0200] "GET /nube/csrftoken HTTP/1.1" 200 1491 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78$
79.145.180.149 - polkillas [11/Jul/2020:17:15:00 +0200] "PROPFIND /nube/remote.php/dav/files/polkillas/ HTTP/1.1" 207 4938 "-" "Mozilla/5.0 (Linux) mirall/2.6.4git (Ne$
79.145.180.149 - - [11/Jul/2020:17:15:20 +0200] "GET /.well-known/carddav HTTP/1.1" 404 4332 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:15:23 +0200] "GET /.well-known/carddav HTTP/1.1" 404 1156 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:15:24 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:15:21 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 269 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:15:28 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:15:35 +0200] "GET /remote.php/dav/ HTTP/1.1" 404 1156 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/7$
79.145.180.149 - - [11/Jul/2020:17:15:51 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:16:16 +0200] "GET /remote.php/dav/ HTTP/1.1" 404 4332 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/7$
79.145.180.149 - - [11/Jul/2020:17:16:21 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:16:21 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 269 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:16:48 +0200] "GET /nube/remote.php/dav HTTP/1.1" 200 1389 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:16:51 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 269 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:17:21 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:17:44 +0200] "GET /nube/remote.php/dav HTTP/1.1" 200 4565 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:17:51 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 269 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:17:53 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:18:23 +0200] "GET /.well-known/carddav HTTP/1.1" 404 4332 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:18:26 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:18:51 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:19:21 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:19:48 +0200] "GET /.well-known/carddav HTTP/1.1" 404 4332 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:19:51 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 269 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:20:27 +0200] "GET /.well-known/carddav HTTP/1.1" 404 4332 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:20:45 +0200] "GET /nube/remote.php/dav HTTP/1.1" 200 1389 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:20:51 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 269 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:21:22 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:21:52 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:22:22 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:22:52 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:23:22 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
95.127.157.3 - virginia [11/Jul/2020:17:22:57 +0200] "HEAD /nube/remote.php/webdav/Photos/2020/Capturas/cuadernos20_gatas_veinte_mujeres_de_madrid.pdf HTTP/1.1" 401 44$
79.145.180.149 - - [11/Jul/2020:17:23:34 +0200] "GET /nube/remote.php/dav HTTP/1.1" 200 4565 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:23:46 +0200] "GET /.well-known/dav HTTP/1.1" 404 1156 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/7$
79.145.180.149 - - [11/Jul/2020:17:23:52 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:23:57 +0200] "GET /carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
79.145.180.149 - - [11/Jul/2020:17:24:07 +0200] "GET /.well-known/carddav HTTP/1.1" 404 1156 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:24:24 +0200] "GET /.well-known/carddav HTTP/1.1" 404 4332 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firef$
79.145.180.149 - - [11/Jul/2020:17:24:26 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:24:27 +0200] "GET /.well-known/carddav HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefo$
79.145.180.149 - - [11/Jul/2020:17:24:52 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:25:23 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:25:53 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:26:23 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:26:51 +0200] "GET /nube/csrftoken HTTP/1.1" 200 1493 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78$
79.145.180.149 - - [11/Jul/2020:17:26:53 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 269 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:27:23 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:27:53 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:28:15 +0200] "GET / HTTP/1.1" 200 4080 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
79.145.180.149 - - [11/Jul/2020:17:28:15 +0200] "GET /icons/openlogo-75.png HTTP/1.1" 200 6159 "https://polkillas.ddns.net/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; r$
79.145.180.149 - - [11/Jul/2020:17:28:15 +0200] "GET /favicon.ico HTTP/1.1" 404 596 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"
79.145.180.149 - - [11/Jul/2020:17:28:23 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:28:53 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:29:23 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
79.145.180.149 - - [11/Jul/2020:17:29:53 +0200] "GET /nube/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 829 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x8$
7