Page 1 of 1

Configuring nagiosxi to https redirect only

Posted: Fri Dec 09, 2016 5:12 am
by yunushaikh
Hello Experts,

I have recently installed nagios xi enterprise.
I have default configuration as of now.
We have done the setting from AWS side and configured the ssl certificate from AWS itself.
Now if I open the nagios URL with http and https it works fine with both.
Requirement is now whenever there is any http request we want it directly to route to https.

Can anyone please help with what configurations needs to be done in nagios for redirecting the nagios url permanently to https even if http request is made.

Thanks a lot

Re: Configuring nagiosxi to https redirect only

Posted: Fri Dec 09, 2016 8:59 am
by eloyd
Assuming you have a working SSL (https) configuration (if not, then read this: https://assets.nagios.com/downloads/nag ... s%20XI.pdf) then the only thing you need to do is at the Apache level, redirect all non-SSL traffic to the SSL version.

Edit /etc/httpd/conf.d/ssl.conf and add these lines at the bottom to redirect http to https:

Code: Select all

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/%$1 [R,L]
Now, all requests to http://<server>/nagiosxi/... will be redirected to https://<server>/nagiosxi/...

Re: Configuring nagiosxi to https redirect only

Posted: Fri Dec 09, 2016 11:56 am
by dwhitfield
Thanks @eloyd!

Are we ready to lock this up?

Re: Configuring nagiosxi to https redirect only

Posted: Wed Jan 04, 2017 11:17 pm
by yunushaikh
Hey Thanks for suggestion.

You can close this thread