Page 1 of 1

nagios allow http communications

Posted: Mon Aug 17, 2020 9:12 am
by veeravamsi
Hi Team,

We have issues with Certificates over SSL/https , so wondering if we can enable HTTP also ?

I couldnt find which file i need to edit ( currently only https is allowed and running )

--Vamsi

Re: nagios allow http communications

Posted: Tue Aug 18, 2020 1:57 pm
by jbrunkow
I believe you can allow HTTP connections the following way, unless this was set up using another method.

Edit the configuration file.
CentOS / Red Hat

Code: Select all

vi /etc/httpd/conf.d/nagiosxi.conf
Debian / Ubuntu

Code: Select all

vi /etc/apache2/conf-enabled/nagiosxi.conf
Then delete the following lines.

Code: Select all

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
...and restart Apache to apply the configuration.
CentOS / Red Hat

Code: Select all

systemctl restart httpd.service
Debian / Ubuntu

Code: Select all

systemctl restart apache2.service
How To Configure SSL/TLS

If you have any questions, please run this command (as root) and send us the resulting /tmp/HTTPDFILES.zip file:

CentOS / Red Hat

Code: Select all

zip -r /tmp/HTTPDFILES.zip /etc/httpd/conf/httpd.conf /etc/httpd/conf.d
Debian / Ubuntu

Code: Select all

zip -r /tmp/HTTPDFILES.zip /etc/apache2/apache2.conf /etc/apache2/conf-enabled /etc/apache2/sites-enabled

Re: nagios allow http communications

Posted: Wed Aug 19, 2020 3:23 am
by veeravamsi
Thanks. I dont see the lines you mentioned to delete . Only these are found :

<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>

Re: nagios allow http communications

Posted: Wed Aug 19, 2020 3:40 pm
by jbrunkow
Huh, it must not have been configured that way then. You may be able to run one of the following commands to find out what the HTTP configuration file is for your server.

Red Hat / CentOS

Code: Select all

httpd -S
Debian / Ubuntu

Code: Select all

apachectl -S
Otherwise, please provide ( PM ) us the entire Apache configuration. One of the following commands will compress the relevant folders in a file called HTTPDFILES in your /tmp directory.

Red Hat / CentOS

Code: Select all

zip -r /tmp/HTTPDFILES.zip /etc/httpd/conf/httpd.conf /etc/httpd/conf.d
Debian / Ubuntu

Code: Select all

zip -r /tmp/HTTPDFILES.zip /etc/apache2/apache2.conf /etc/apache2/conf-enabled /etc/apache2/sites-enabled
You will also probably need to change the setting to "use https" in the PHP config and update the program URL.

Code: Select all

vi /usr/local/nagiosxi/html/config.inc.php
Find the following line:

Code: Select all

$cfg['use_https']=true;
Change it to:

Code: Select all

$cfg['use_https']=false;

Re: nagios allow http communications

Posted: Thu Aug 27, 2020 9:29 am
by veeravamsi
Thanks . You can close this threadd.

Re: nagios allow http communications

Posted: Thu Aug 27, 2020 11:01 am
by scottwilkerson
veeravamsi wrote:Thanks . You can close this threadd.
Great!

Closing thread