How to Disable HTTPS on XI?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

How to Disable HTTPS on XI?

Post by axvers »

Hello XI support,

We installed XI with https enabled at first time.

But our client ask us to disable https; they want to connect through http only.

And I tried to find some settings on XI Web UI, like "/Admin/System settings", found nothing relative.

Is there any way to disable https on UI?

OR, we need to modify some config file such as "config.inc.php" or "ssl.conf" to achieve this?

Thanks!


System Info:
- CentOS 7, 64 bit
- VM
- pure Nagios XI installed, no other apps (even nginx)
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: How to Disable HTTPS on XI?

Post by benjaminsmith »

Hello @axvers,

By default, Nagios XI doesn't force the use of SSL. Go to Admin > System Settings > General Program Settings and make sure the Program URL is not set for https.

Also, there is a configuration setting for force https in /usr/local/nagiosxi/html/config.inc.php. Make sure that is set to false.

Code: Select all

// Force http/https
$cfg['use_https'] = false; // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP
Let me know if you have any other questions. Thanks.
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Re: How to Disable HTTPS on XI?

Post by axvers »

Hello,

It turned out that these settings are not working.

The XI site still auto-connect over https (image 002).

We changed the Admin > System Settings > General Program Settings (image 001)
and
/usr/local/nagiosxi/html/config.inc.php. (image 004)

, then restart httpd.

Is there any other settings need to be modified?

Thanks!
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to Disable HTTPS on XI?

Post by lmiltchev »

In addition to what you already did, do the following:

1. Open the /etc/httpd/conf.d/ssl.conf file in a text editor, and change these two lines:

Code: Select all

SSLCertificateFile /usr/local/nagiosxi/var/certs/nagiosxi.crt
SSLCertificateKeyFile /usr/local/nagiosxi/var/certs/nagiosxi.key
to these:

Code: Select all

SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
Go to the bottom of the file, and remove (or comment out) this section:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
</IfModule>
Save and exit.

2. Open the /etc/httpd/conf.d/nagiosxi.conf file in a text editor, and change this:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
to this:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule nagiosxi/api/v1/(.*)$ /usr/local/nagiosxi/html/api/v1/index.php?request=$1 [QSA,NC,L]
</IfModule>
Save and exit.

3. Restart apache:

Code: Select all

service httpd restart
Let us know if this helped. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
axvers
Posts: 65
Joined: Tue Jan 08, 2019 8:31 pm

Re: How to Disable HTTPS on XI?

Post by axvers »

Hi Support,

It worked like a charm!

Thank you very much!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: How to Disable HTTPS on XI?

Post by lmiltchev »

I am glad I could help! :)
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked