NextCloudのサーバーアドレスを変更してアクセスすると以下のメッセージが出て来る。

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.

Depending on your configuration, this button could also work to trust the domain:

"hogehoge.com" を信頼するドメイン名に追加

書いてある通りconfig.phpを編集すればOK
# vi /usr/share/nginx/html/nextcloud/config/config.php

'trusted_domains' =>
array (
0 => '192.168.1.*',
1 => 'hogehoge.com',
),