NSURLErrorDomain Error -999 on iOS

Installed latest version.
With iPhone Nextcloud app it is not possible to log in.

After entering username/pwd an error is displayed:
NSURLErrorDomain Error -999

The suggestion in

(/var/www/html/nextcloud/config/config.php
‘overwriteprotocol’ => ‘https’,)

does not solve it for me. In log there is:

Error PHP Use of undefined constant ‘https’ - assumed '‘https’' (this will throw an Error in a future version of PHP) at /data/www/html/nextcloud/config/config.php#27

When I remove that line in the config file the error does not appear in the log anymore.

Can this be solved?
Should http2 be in the reverse proxy config?
A complication is I don’t have an iPhone and I don’t want to ask someone else too often for testing.

–
Setup:

On home LAN.
Lets Encrypt certificate without mail address.

Box1
reverse proxy (nginx):
listen 443 ssl http2;
location / {
proxy_pass http://192.x.x.x;
}

Box2:
webserver (apache2):
Nextcloud on 192.x.x.x:80
version 22.1.1

@zoo3 Can you solve this topic? With your setup the iPhone app works.

I was a simple mistake. I’m sorry I couldn’t help you.

Because there is ‘NS’ and ‘Domain’ in the error my best guess was to switch from http to https.
That solved it.
Don’t know if hsts is mandatory. It is now applied at my domain.

A better error message would have been ‘https only’ or similar.