Page 1 of 1

Ip address is used instead of FQDN

Posted: Mon Sep 30, 2019 2:41 pm
by saber
Hi,

Since we upgraded to 2.1.0 , there is a widget called "Total Disk Usage" on homepage. However, it's called using the server ip address instead of FQDN. Thus, Chrome reports an SSL mismatch.. and we get a white blank box instead of the "Total Disk Usage".

Thanks.
Saber

Re: Ip address is used instead of FQDN

Posted: Mon Sep 30, 2019 3:42 pm
by cdienger
Please provide a bit more information so we can better understand the issue. We may need to make changes on our end going forward and need to understand exactly what you're running into.

Is this only happening on Chrome? Are you running into https://support.google.com/chrome/a/ans ... 1219?hl=en ? What is set for the certificate's common name and subjectAlternativeName ?

That said, you can configure it to use the hostname instead by editing line 105 of /var/www/html/nagioslogserver/application/views/home.php from:

Code: Select all

address = nodes[i]['address'];
to:

Code: Select all

address = nodes[i]['hostname'];
A similar change needs to be made to line 51 of /var/www/html/nagioslogserver/application/views/admin/ncpa.php so that it looks like:

Code: Select all

<option value="<?php echo $node['hostname']; ?>">
and also line 29 of /var/www/html/nagioslogserver/application/views/admin/system_status.php:

Code: Select all

<option value="<?php echo $node['hostname']; ?>">

Re: Ip address is used instead of FQDN

Posted: Mon Sep 30, 2019 4:34 pm
by saber
Before 2.1.0 , there were no "Total Disk Usage" widget.

Now, this specific javascript file is being loaded directly from the ip address instead of the domain. Exemple, visit "XXX.domain.com" , then check source code and you will see a javascript file trying to load from the server ip address instead of "XXX.domain.com" and thus the SSL error. Our cert is valid for the domain only which is absolutely normal and never had any issue before 2.1.0.

Re: Ip address is used instead of FQDN

Posted: Tue Oct 01, 2019 10:49 am
by cdienger
Thanks for the extra info. Has changing the home.php allowed it to load? Additionally, check that there is a "run_index_usage" job under Admin > System > Command Subsystem. Use the "Reset All Jobs" button to create it if isn't listed.

Re: Ip address is used instead of FQDN

Posted: Tue Oct 01, 2019 11:54 am
by saber
Hi,

Editing "/var/www/html/nagioslogserver/application/views/home.php" did the trick, thanks.

Please include the fix in the new versions.

Thanks,
Saber

Re: Ip address is used instead of FQDN

Posted: Tue Oct 01, 2019 1:59 pm
by mbellerue
We will get the fix in. Thank you for helping us track it down. Closing thread.