"Untrusted Domain" error on main domain different from installation

Hi to all,
I installed NC successfully on the subdomain “cloud.domain.com.bo” it works great, after that, I installed WordPress on “domain.com.bo”.

Now I have the following issue:

When I try to access my WordPress installation through HTTP protocol on port 80 on doman.com.bo or www.domain.com.bo it shows the “Access through Untrusted Domain” error, but if protocol changes to HTTPS on 443 it shows WordPress site.

Idk what could be the problem, I’m using an apache web server on OpenSuse 15.4.

my vhost conf for cloud.domain.com.bo is:

<VirtualHost *:80>
 DocumentRoot /srv/cloud
 ServerName cloud.domain.com.bo
 ServerAdmin webmaster
 <Directory /srv/cloud>
  Options -Indexes +FollowSymLinks
  AllowOverride all
  Require all granted
 </Directory>
<IfModule mod_dav.c>
      Dav off
    </IfModule>
RewriteEngine on
RewriteCond %{SERVER_NAME} =cloud.domian.com.bo
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

and the domain.com.bo is:

<VirtualHost *>
 DocumentRoot /srv/www/htdocs
 ServerName domain.com.bo
 ServerAlias www.domain.com.bo
 ServerAdmin webmaster
 <Directory /srv/www/htdocs>
  AllowOverride none
  Require all granted
 </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.domain.com.bo [OR]
RewriteCond %{SERVER_NAME} =domain.com.bo
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

as you can see both sites are running on different directories, also in my config.php in trusted domain section only points to cloud.domain.com.bo

'trusted_domains' =>
  array (
    0 => 'cloud.domain.com.bo',

Could you please help me whit this issue?

Greetings from Bolivia

the trusted domains can be edited in the configfile by default located in /var/www/nextcloud/config/config.php

Change config.php trusted domains to

'trusted_domains' =>
  array (
    0 => 'cloud.domain.com.bo',
    1 => 'www.domain.com.bo',

Hail to all,
I found the error, it was a configuration for apache, in my main host domain.com.bo

<VirtualHost *>

so I made changes to:

<VirtualHost *:80>

restart apache and the error goes, no more untrusted_domain on WordPress installation.

Regards

1 Like