Redirecting http to https

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Redirecting http to https

Post 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?
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: Redirecting http to https

Post 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 ?
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Redirecting http to https

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Bitflogger
Posts: 226
Joined: Mon Oct 16, 2017 9:24 am

Re: Redirecting http to https

Post by Bitflogger »

Hello,

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

Earl
Locked