If you get the error edit trusted_domains parameter in config/config.php when trying to login to Nextcloud cloud storage, it means you cannot log in to Nextcloud with this domain name or IP address. This is used by Nextcloud to prevent host header poisoning. You will need to specify each domain or IP address to access Nextcloud. This means if you have for example Nextcloud IP address 192.168.2.16 and you need to access the domain name your_domain.ru, you need to add your_domain.ru domain to Nextcloud's trusted domains. To do this, open the Nextcloud config.php configuration file with any text editor. File location may be different in your system. Let's run the command:
sudo nano /var/www/nextcloud/config/config.php
Initially, the trusted domains array in the configuration file will look like this:
'trusted_domains' =>
array (
0 => '192.168.2.16',
),
To add a new domain to the trusted domains array you simply need to add it to this array:
'trusted_domains' =>
array (
0 => '192.168.2.16',
1 => ‘your_domain.ru’,
),
Note: Nextcloud is optimized to use a single domain. So it's better to use a single domain