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
Configuring nagiosxi to https redirect only
-
yunushaikh
- Posts: 176
- Joined: Sat Jun 20, 2015 9:04 pm
Re: Configuring nagiosxi to https redirect only
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:
Now, all requests to http://<server>/nagiosxi/... will be redirected to https://<server>/nagiosxi/...
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]
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
-
yunushaikh
- Posts: 176
- Joined: Sat Jun 20, 2015 9:04 pm
Re: Configuring nagiosxi to https redirect only
Hey Thanks for suggestion.
You can close this thread
You can close this thread