Next cloud trusted hosts not working, how to fix that?

I have installed nextcloud a cloud machine on azure.
I am able to access it using http://localhost/nextcloud on that machine.
But, if I I try to access using the server public IP, it is not working.

So configured config.php as below.
‘trusted_domains’ =>
array (
0 => ‘localhost’,
1 => ‘’,
2 => ‘’,
3 => ‘[fe80::1:50]’,
4 => ‘’,
5 => ‘’,

But, still I am getting this error.

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.

Further information how to configure this can be found in the documentation.

Even the below command showing the entries but not able to access.
uday@Test:/var/www/html/nextcloud$ sudo -u ‘#33’ php /var/www/html/nextcloud/occ config:system:get trusted_domains

could be that they want a FQDN rather than an IP