Trusted domains won't work

Hi,

usually I used a Raspberry Pi for nextcloud, but after facing some problems with the hardware I rented a vServer. And I also bought a domain.

So the problem I have is, that I it says that the domain is not trusted (it works with the public IP address). The domain is my last name, so f.e. smith.com. The installation is on smith.com/nextcloud and I also registered a subdomain with nextcloud.smith.com.
So I wrote the following in the config.php:
‘trusted_domains’ =>*
array (
0 => ‘XXX.XXX.XXX.XXX’,
1 => ‘smith.com
),

Is this correct? Why doesn’t it work?

Nextcloud version: 20.0.2
Operating system and version: Debian 10
Apache 2.4.38
PHP version 7.3

thx in advance

I don’t know why but it works… I added ‘nextcloud.smith.com’ and restarted apache…

It’s because smith.com and nextcloud.smith.com are not the same thing. The one used to access it must be in the list.

The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

Technical details

  • Remote Address: 104.245.14.130
  • Request ID: EmHSaLv54XsqQBQELXO3

What’s wrong that it would not turn out untrusted domain after add nextcloud.xxx.com ?
It still doesn’t work after add 104.245.14.130.