[SOLVED]Forced Http to redirect to Https failure

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

Moderators: Developers, Moderators

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

[SOLVED]Forced Http to redirect to Https failure

Post by rdotson159 »

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 Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

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

Post by Osiris »

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

Post by amazen123 »

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

Post by Stefey »

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

Post by amazen123 »

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

Post by Stefey »

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

Post by Hokleng »

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: 3441
Joined: Sun Aug 27, 2017 12:05 am

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

Post by netniV »

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.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests