Hello,
I have just installet Nextcloud and I have some problem with this " Access through untrusted domain" error. Maybe someone of you can help me with this.
My infra:
- I have a VM with a nginx that works as reverse proxy. It has the certbot and is where I store the certificates, the internal traffic uses the port 80. [10.0.11.10]
- I have a VM with all the databases (MariaDB included) [10.0.12.10]
- And I have a VM with the Nextcloud + Nginx + PHP8.2-FPM [10.0.14.11]
I was able to run the installation setup and it has created everything in the database, so it works fine.
The problem starts now, when I try to access to https://nexcloud.mydomain.com. Appears the following error:
Access through untrusted domain
Please contact your administrator. If you are an administrator, edit the “trusted_domains” setting in config/config.php like the example in config.sample.php.
Further information how to configure this can be found in the [documentation]
I saw everywhere that we need to edit the /config/config.php file and we done that with the following configuration:
<?php
$CONFIG = array (
'instanceid' => '******************',
'passwordsalt' => '*****************',
'secret' => '********************',
'trusted_domains' =>
array (
0 => 'nextcloud.mydomain.com',
1 => 'https://nextcloud.mydomain.com',
2 => 'http://nextcloud.mydomain.com',
3 => '10.0.11.10', <-- This is the reverse proxy IP
4 => '10.0.12.10', <-- This is the mysql IP
5 => '10.0.0.1', <-- This is my FW IP
6 => '10.0.11.1', <-- This is the reverse proxy gateway
7 => '10.0.12.1' <-- This is the mysql gateway
8 => '127.0.0.1' <-- Localhost
9 => '10.0.14.1' <-- This is the nextcloud VM gateway
),
'trusted_proxies' => ['10.0.11.10'],
'datadirectory' => '/media/NEXTCLOUD/',
'dbtype' => 'mysql',
'version' => '27.0.2.1',
'overwrite.cli.url' => 'https://nextcloud.mydomain.com',
'dbname' => '**************',
'dbhost' => '10.0.12.10',
'dbport' => '3306',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => '*************',
'dbpassword' => '********************',
'installed' => true,
);
As you can see I have added the domain name, the Proxy IP, the localhost IP and the mysql IP (I know it is not necessary, but I am frustrated)
Can someone help me with this?
Best regards,