How to add a trusted domain in Nextcloud

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

 

Have you tried Virtual cloud servers by Cloud4Y? Not yet? 

Leave a request and get a 10-day free trial. 

Смотреть подробности   
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Как подсоединить папку по WebDav в Mac OS

Для получения доступа к папке Nextcloud по протоколу WebDav в Mac OS, можно использовать...

How to connect the Nextcloud folder via WebDav in the mobile OS

Go to Nextcloud cloud storage, click Folder in the top panel, and then Settings. Then in the...

Connecting free SSL certificate from Let's Encrypt to Nextcloud

This tutorial describes how to connect an SSL certificate to Nextcloud based on the apache2 web...

How to connect a folder via WebDav in Windows

Go to the Nextcloud cloud storage, click on the Folder icon in the top bar, and then Settings...

Как создавать и удалять пользователей на SaaS Nextcloud

После того как вы пройдёте по ссылке https://orgname.corpdrive.cloud4u.com в вашем браузере , где...