Hello there,
I’m facing problems reaching my nextcloud instance through my local network. The nextcloud folder is located at /var/www/example.com/public/nextcloud
and reachable through cloud.example.com
.
Now when I’m trying to reach my instance through the local IP 192.168.188.22/nextcloud
I’m getting the “Untrusted Domains” message.
I tried adding the local IP in the config.php
, which now looks like this:
<?php
$CONFIG = array (
'passwordsalt' => 'XXX',
'secret' => 'XXX',
'trusted_domains' =>
array (
0 => '192.168.188.22/nextcloud/',
1 => 'example.com',
2 => 'cloud.example.com',
3 => 'example.info',
4 => 'localhost'
),
'datadirectory' => '/mnt/user/nextcloud_data',
'dbtype' => 'mysql',
'version' => '19.0.4.2',
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => true,
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
),
'overwrite.cli.url' => '',
'htaccess.RewriteBase' => '/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'oc_admin',
'dbpassword' => 'XXX',
'installed' => true,
'instanceid' => 'ocpofaewdg0n',
'maintenance' => false,
'mail_smtpmode' => 'smtp',
'mail_smtpsecure' => 'ssl',
'mail_sendmailmode' => 'smtp',
'mail_from_address' => 'cloud',
'mail_domain' => 'example.com',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'mail.example.com',
'mail_smtpport' => '465',
'mail_smtpname' => 'cloud@example.com',
'mail_smtppassword' => 'XXX',
'theme' => '',
'loglevel' => 2,
'logfile' => '/var/log/nextcloud.log',
);
So as you can see the local IP is added in the trusted domains array but still I’m getting the Untrusted Domains message.
The VirtualHost file for cloud.example.com
looks like this, if this is any help:
<VirtualHost *:80>
DocumentRoot "/var/www/example.com/public/nextcloud/"
ServerName cloud.example.com
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>