Page 1 of 2

Setting up Nagios with SSL

Posted: Tue Oct 11, 2016 5:02 pm
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!

Re: Setting up Nagios with SSL

Posted: Tue Oct 11, 2016 6:20 pm
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

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 3:23 pm
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.

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 3:48 pm
by lmiltchev
What are the errors that you see in the apache error log?

Code: Select all

tail -100 /var/log/httpd/error_log

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 4:27 pm
by scheema31
are you sure that is the log file?
I have that file but no new logs are added to it.

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 4:34 pm
by dwhitfield
could you post the output of httpd -V (note the cap V)

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 4:35 pm
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

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 5:09 pm
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

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 5:23 pm
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

Re: Setting up Nagios with SSL

Posted: Wed Oct 12, 2016 6:38 pm
by Box293
You might need to do this:

Code: Select all

yum install mod_ssl
service httpd configtest