Setting up Nagios with SSL

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
scheema31
Posts: 90
Joined: Wed Jun 06, 2012 1:11 pm

Setting up Nagios with SSL

Post by scheema31 »

hi i have migrated my nagios from rhel 5 to rhel 7 server, i have mostly everything working.
Now i just need to get it running over HTTPS, on the older server i already had it running over HTTPS.
what would be my best/easiest approach to migrating https over to my new server.

thanks!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Setting up Nagios with SSL

Post by Box293 »

First make sure port 443 inbound is open on the local firewall.

You should be able to copy over your Apache configs and certificate from the old server to the new server, they might be:

Code: Select all

/etc/httpd/conf.d/ssl.conf
/etc/httpd/conf/httpd.conf

The following guide is for Nagios XI however the core Apache config should be similar:
https://assets.nagios.com/downloads/nag ... os%20XI.pd
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
scheema31
Posts: 90
Joined: Wed Jun 06, 2012 1:11 pm

Re: Setting up Nagios with SSL

Post by scheema31 »

I have moved those files over to new server including the certificate/key files its points to,
however this stops my apache server.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Setting up Nagios with SSL

Post by lmiltchev »

What are the errors that you see in the apache error log?

Code: Select all

tail -100 /var/log/httpd/error_log
Be sure to check out our Knowledgebase for helpful articles and solutions!
scheema31
Posts: 90
Joined: Wed Jun 06, 2012 1:11 pm

Re: Setting up Nagios with SSL

Post by scheema31 »

are you sure that is the log file?
I have that file but no new logs are added to it.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Setting up Nagios with SSL

Post by dwhitfield »

could you post the output of httpd -V (note the cap V)
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Setting up Nagios with SSL

Post by tgriep »

Try running this

Code: Select all

service httpd restart
And then see if you find any errors in any of the files in this folder and post it here.

Code: Select all

/var/log/httpd
Be sure to check out our Knowledgebase for helpful articles and solutions!
scheema31
Posts: 90
Joined: Wed Jun 06, 2012 1:11 pm

Re: Setting up Nagios with SSL

Post by scheema31 »

hey dwhitfield
the httpd -V command give following error:
httpd: Syntax error on line 148 of /etc/httpd/conf/httpd.conf: Cannot load modules/mod_auth_kerb.so into server: /etc/httpd/modules/mod_auth_kerb.so: cannot open shared object file: No such file or directory
looks like module related, i defenatly see that the old httpd file from old server has alot of modules listed where as the new one doesnt
scheema31
Posts: 90
Joined: Wed Jun 06, 2012 1:11 pm

Re: Setting up Nagios with SSL

Post by scheema31 »

okay i think ive fixed that error, i just commented out the modules and poinited it to the folder where they are on the new server and now apache starts fine.
However when adding the ssl.conf file i get an error running httpd -V, looks like another module related error:

Code: Select all

# httpd -V
httpd: Syntax error on line 214 of /etc/httpd/conf/httpd.conf: Syntax error on line 12 of /etc/httpd/conf.d/ssl.conf: Cannot load modules/mod_ssl.so into server: /etc/httpd/modules/mod_ssl.so: cannot open shared object file: No such file or directory
i checked in the /etc/httpd/modules/ and is not listed there
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Setting up Nagios with SSL

Post by Box293 »

You might need to do this:

Code: Select all

yum install mod_ssl
service httpd configtest
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked