Change URL Nextcloud

Hello,

i’m running nextcloud over years.
Now i would change the ULR from nextcloud.
From “cloud.test.com” to “cloud.test2.com” as example.
Which files i must change ?

Regards
Alex.

Should only be:

  • nextcloud/config/config.php (trusted_domains and overwrite.cli.url)
  • web server files (server_name, regarding new cert path and cert files)
  • SSL certs (keep in mind to get new certificates for new domain)
1 Like

Hi Schmu,

thanks for your reply. For the new Domain i have a Wildcard Certificate :slight_smile:

I tried this changes afternoon.

Regards
Alex.

You’re welcome :slight_smile:

I’m just wondering however, are you really sure your wildcard cert will still work? The way I understand wildcard here is, that you can use a wildcard cert for domain.tld for example for:
sub1.domain.tld
sub2.domain.tld
and so on.

For another-domain.tld however you would need a new wildcard cert, which can then again be used for:
sub1.another-domain.tld
sub2.another-domain.tld
and so on.

Please verify before, to avoid running into issues.

Hi Schmu,

i transfered the domain and all is okay !

Thanks for your Help !

2 Likes

Hello tux73,

and what did you do with the clients? I have set a permanent redirect in the apache config, ok works, but the clients open a window in a browser and I have to enter my credentials again (and all other users too). Is there a way to change the url without this trouble with the clients?

No te recomiendo redireccionarlos lo que si puedes hacer es paulatinamente migrar a cada uno de tus clientes pero puedes mantener ambos hostname.

Edit your config.php on your nextcloud , for wopy - loolwsd.xml and default-ssl.conf or 00-default.conf for your site web use virtualhost

File: config.php
… ‘trusted_domains’ =>
…array (
.0 => ‘localhost’,
.1 => ‘example1.com’, (your old link-to config.php)
.2 => ‘new_nextcloud.example1.com’, (your new link-to config.php)
…
…‘overwrite.cli.url’ => ‘https://new_nextcloud.example1.com.mx’,

edit file wopy: loolwsd.xml
Seach
https://***:9980 or http://:9980

edit file virtualhost: conf if apache
Seach
ServerName old.nextcloud
In this file add other <virtual host :> with same configuration and change this
ServerName new.nextcloud

Hi,

I am also trying the same thing. Please check

<?php $CONFIG = array ( 'instanceid' => 'oc4dggvxs6vk', 'passwordsalt' => 'pOOyDgV1pFLR+Jl5zdv7HeXSYAz/mz', 'secret' => 'lnzXKhTfD/Y9dGvsLLRu5nPpZnR8VSMOkYr50ftmzJKMypav', 'trusted_domains' => array ( 0 => '192.168.43.244', ), 'datadirectory' => '/var/www/html/nextcloud/data', 'dbtype' => 'mysql', 'version' => '19.0.0.12', 'overwrite.cli.url' => 'http://192.168.43.244/nextcloud', 'dbname' => 'nextclouddb', 'dbhost' => 'localhost:3306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud_user', 'dbpassword' => 'jeyadevan123$', 'installed' => true, ); Now the webdav page lis http://127.0.0.1/nextcloud/index.php/apps/files/?dir=/&fileid=5 I am not able to log into my netlink modem page, it opens the apache default page... What should I do? How can I change the local host address and use my mobile hotspot and use that IP? Please help

Is this a legit entry? I got help from someone

rewrite /nc/(.*) /$1 break;
proxy_pass http://nc-server;