The reverse proxy header configuration is incorrect... error behind sslh (no typo ;))

Nextcloud version: 21.0.1
Operating system and version: Ubuntu 20.04
Apache or nginx version: Apache 2.4.41
PHP version: 8.0.3

On my server sslh is running (a tools to user port 443 for different applications. handy if you try to reach your server from hotels when the firewall blocks ports other than 443)
This app listens on port 443 and forwards https-requests to port 4443 (in my case)
(while running apache directly on 443, i do not have the following problem)

At settings/Administration/Overview i allways get the message:
There are some warnings regarding your setup.

  • The reverse proxy header configuration is incorrect,…

(no wellknown or caldav issues)

it seems, that nextcloud thinks sslh was a reverse proxy so i tried lots of different settings, but i cannot find one, which solves that problem.

‘trusted_domains’ =>
array (
0 => ‘’,
1 => ‘cloud.domain.tld’,
‘trusted_proxies’ =>
array (
0 => ‘’,
1 => ‘’,
2 => ‘localhost’,
3 => ‘::1’,
‘overwrite.cli.url’ => ‘https://cloud.dimain.tld’,
‘overwritewbroot’ => ‘/’,
‘htaccess.RewriteBase’ => ‘/’,

RewriteEngine On
RewriteRule .* - [R=405,L]

RewriteRule ^/\.well-known/webfinger https://%{SERVER_NAME}/index.php/.well-known/webfinger [R=301,L]
RewriteRule ^/\.well-known/nodeinfo https://%{SERVER_NAME}/index.php/.well-known/nodeinfo [R=301,L]
RewriteRule ^/\.well-known/carddav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]
RewriteRule ^/\.well-known/caldav https://%{SERVER_NAME}/remote.php/dav/ [R=301,L]

ProxyPass /push/ws ws://
ProxyPass /push/
ProxyPassReverse /push/

(the last entries are for client_push_app)

any suggestions to solve that ?

anyboy ? push