[SOLVED]Forced Http to redirect to Https failure

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Moderators, Developers

Post Reply
Author
Message
rdotson159
Posts: 1
Joined: Sat Apr 01, 2017 11:08 pm

[SOLVED]Forced Http to redirect to Https failure

#1 Post by rdotson159 » Sat Apr 01, 2017 11:16 pm

I have 1.1.1 installed on Windows Server 2012. all was up and working great, but I decided to have page redirect http to https. now logon page will not load.

It is running under Apache2.4, which I don't know anything about.

I assume the setting is saved somewhere in a config file, but can't find it.

thanks in advance

User avatar
Osiris
Cacti Pro User
Posts: 863
Joined: Mon Jan 05, 2015 10:10 am

Re: Forced Http to redirect to Https now cannot open page

#2 Post by Osiris » Mon Apr 03, 2017 6:15 pm

settings table
Before history, there was a paradise, now dust.

amazen123
Posts: 43
Joined: Wed Oct 26, 2016 3:30 am

Re: Forced Http to redirect to Https now cannot open page

#3 Post by amazen123 » Sun Apr 16, 2017 6:39 pm

Configure SSL on your Apache.

Stefey
Posts: 7
Joined: Thu Apr 27, 2017 7:43 am

Re: Forced Http to redirect to Https now cannot open page

#4 Post by Stefey » Wed May 10, 2017 7:21 am

Hi,

I'm having the same issue.
I turned on the "force https" option in Cacti settings, and I now can't access anymore to the website.

I connected to the cacti database to see the settings table as Osiris suggested.
I saw one parameter "force_https" with the "on" value. I turned it into "off" but nothing has changed.

Do you have a solution to disable the https without accessing the website ? I'm just doing some training on Cacti so I really don't need https at the moment.

Thank you :)

amazen123
Posts: 43
Joined: Wed Oct 26, 2016 3:30 am

Re: Forced Http to redirect to Https now cannot open page

#5 Post by amazen123 » Wed May 10, 2017 7:59 pm

Did you try to install SSL on your Apache?

Stefey
Posts: 7
Joined: Thu Apr 27, 2017 7:43 am

Re: Forced Http to redirect to Https now cannot open page

#6 Post by Stefey » Thu May 11, 2017 3:03 am

Hi amazen,

Actually I just did, and it works perfectly now.
As I'm not that familiar with SSL on Apache, I followed up this tutorial : https://www.digitalocean.com/community/ ... r-centos-7

It worked perfectly for me, and I'm now using Cacti with HTTPS.

Thank you very much :)

Hokleng
Posts: 2
Joined: Mon Mar 19, 2018 10:36 pm

Re: Forced Http to redirect to Https now cannot open page

#7 Post by Hokleng » Mon Mar 19, 2018 10:48 pm

Hi,
This case was resolved, But just want to share some information if you click force https and can't access to cacti anymore.

You can go to <cacti path>/incloud/global.php and edit force_https = off

if (read_config_option('force_https') == 'off') {
if (!isset($_SERVER['HTTPS']) && isset($_SERVER['HTTP_HOST']) && isset($_SERVER['REQUEST_URI'])) {
Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "\n\n");
exit;
}
}


It took me day in order to get cacti back.... :( :( :( :( :(

netniV
Cacti Guru User
Posts: 2884
Joined: Sun Aug 27, 2017 12:05 am

Re: Forced Http to redirect to Https now cannot open page

#8 Post by netniV » Tue Mar 20, 2018 3:20 am

I would not advise editing code where it is unnecessary. If you are really unable to get SSL working, it is better to update the settings table rather than edit the code

Code: Select all

update settings set value = '' where name = 'force_https';
However, I would advise on making the SSL work for enhanced security in this day and age.

Post Reply