Page 1 of 1

Redirecting http to https

Posted: Thu Oct 04, 2018 10:33 am
by Bitflogger
Hello,

I am running v5.5.3 64 bit VM CentOS 7.

I have a certificate and can connect to Nagios XI using a URL that starts with https://

I followed the instructions of a previous case:

Adding the following to the bottom of the ssl.conf file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/%$

Things improved, in that going to http://... worked.

However, the URL stays as http://... instead of changing to https://...

How can I tell if its really redirected?

Re: Redirecting http to https

Posted: Thu Oct 04, 2018 10:44 am
by Bitflogger
Hello,

I made it work by copying this to the end of the httpd.conf file and restarting with: sudo systemctl restart httpd.service

<VirtualHost nagiosxi.doit.wisc.edu:80>
RedirectMatch (.*)$ https://nagiosxi.doit.wisc.edu$1
</VirtualHost>

Are the changes to ssl.conf still necessary ?

Re: Redirecting http to https

Posted: Thu Oct 04, 2018 12:39 pm
by cdienger
https://assets.nagios.com/downloads/nag ... s%20XI.pdf covers the necessary changes for httpd.conf, ssl.conf as well as other places where things need to be tweaked.

Re: Redirecting http to https

Posted: Thu Oct 04, 2018 1:00 pm
by Bitflogger
Hello,

The linked doc helped, it works now. Please lock.

Earl