What did I wrong while changing my URL? [SOLVED]

Hey guys I freshly created a sub-domain like cloud.mydomain.com and changed my nextcloud config.php

<?php
$CONFIG = array (
  'trusted_domains' => 
  array (
    0 => 'cloud.mydomain.com',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'overwrite.cli.url' => 'http://cloud.mydomain.com',
);

and my httpd.conf points to DocumentRoot "/var/www/html" where I have a new index.html for future use, and nextcloud is one further down in /var/www/html/nextcloud but still mydomain.com shows the nextcloud landing page, but with the “not trusted” notification, while cloud.mydomain.com shows correctly the nextcloud login page why is my new index.html not used? where is my mistake?

I think you also must change your virtual host settings in apache2 and then reload apache2.

This! An I would also recommentd putting either everything below /var/www or everything below /var/www/html.

E.g. use either…

/var/www/html/nextcloud
/var/www/html/othersite1
/var/www/html/othersite2
etc…

or if you want to use the html folder for some other site, or you already do so, it should be structured like this:

/var/www/html/
/var/www/nextcloud
/var/www/othersite2
etc…

1 Like

yes my virtual host was still not configured right
after some obvious syntax errors and some more research, everything is working fine now :slight_smile:

2 Likes