Nextcloud behind reverse proxy

I have nextcloud installed on a ubuntu 20.04 server (nextcloud) behind a ubuntu 20.04 reverse proxy server. Both use apache2. They are in separate boxes and both use private IP’s (192.168.x.x). Clients receive a certificate from the proxy and are then proxied to nextcloud using proxypass and proxypassreverse. Hence, the client uses https but from then on the two servers use http.
I have set up webdav on nextcloud.
Nextcloud at its web interface works fine and I can map the webdav directory to the nextcloud installation using Windows 10.
I have installed the nextcloud app on Windows 10 but I cannot initialise it. It refuses to accept that I am using https.
Part of the problem is that I can’t find documentation on the meaning of directives in the config. I am worried about “overwrite” because any rewrites should be handled by the proxy. Nextcloud is no use to me without the sync function which appears to be unavailable without the desktop app. I think the problem is the nextcloud config which may have been designed without attention to having a reverse proxy in a separate box. There may also be conflicts with the apache2 proxypass directive as I am not using the alternative rewrite protocol and the nextcloud config may assume I am. I don’t want to install a private cert on nextcloud because I don’t see any security problems with using http on the private LAN particularly as the proxy is ‘trusted’ as far as nextcloud is concerned (this was the only useful point I could find about the config file in the online setup instructions.
my config is:
$CONFIG = array (
‘trusted_proxies’ => [‘IP of proxy’],
‘instanceid’ => ‘xyz’,
‘passwordsalt’ => ‘xyz’,
‘secret’ => ‘xyz’,
‘trusted_domains’ =>
array (
0 => ‘proxy name in /etc/hosts:8080’,
),
‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘22.1.1.2’,
‘overwrite.cli.url’ => ‘http://nextcloud name in /etc/hosts:8080’,
‘dbname’ => ‘xyz’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘mysql.utf8mb4’ => true,
‘dbuser’ => ‘xyz’,
‘dbpassword’ => ‘’,xyz
‘installed’ => true,
‘app_install_overwrite’ =>
array (
0 => ‘twofactor_yubikey’, # I don’t know why this is here as another problem is that I can’t setup a yubikey - what does the ‘0’ mean?
),
);