Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Apr 21, 2019 1:43 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: [SOLVED]Forced Http to redirect to Https failure
PostPosted: Sat Apr 01, 2017 11:16 pm 
Offline

Joined: Sat Apr 01, 2017 11:08 pm
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: Forced Http to redirect to Https now cannot open page
PostPosted: Mon Apr 03, 2017 6:15 pm 
Offline
Cacti Pro User
User avatar

Joined: Mon Jan 05, 2015 10:10 am
Posts: 753
settings table

_________________
Before history, there was a paradise, now dust.


Top
 Profile  
 
 Post subject: Re: Forced Http to redirect to Https now cannot open page
PostPosted: Sun Apr 16, 2017 6:39 pm 
Offline

Joined: Wed Oct 26, 2016 3:30 am
Posts: 43
Configure SSL on your Apache.


Top
 Profile  
 
 Post subject: Re: Forced Http to redirect to Https now cannot open page
PostPosted: Wed May 10, 2017 7:21 am 
Offline

Joined: Thu Apr 27, 2017 7:43 am
Posts: 7
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 :)


Top
 Profile  
 
 Post subject: Re: Forced Http to redirect to Https now cannot open page
PostPosted: Wed May 10, 2017 7:59 pm 
Offline

Joined: Wed Oct 26, 2016 3:30 am
Posts: 43
Did you try to install SSL on your Apache?


Top
 Profile  
 
 Post subject: Re: Forced Http to redirect to Https now cannot open page
PostPosted: Thu May 11, 2017 3:03 am 
Offline

Joined: Thu Apr 27, 2017 7:43 am
Posts: 7
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 :)


Top
 Profile  
 
 Post subject: Re: Forced Http to redirect to Https now cannot open page
PostPosted: Mon Mar 19, 2018 10:48 pm 
Offline

Joined: Mon Mar 19, 2018 10:36 pm
Posts: 2
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.... :( :( :( :( :(


Top
 Profile  
 
 Post subject: Re: Forced Http to redirect to Https now cannot open page
PostPosted: Tue Mar 20, 2018 3:20 am 
Offline
Cacti Guru User

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

_________________
Official Cacti Developer

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

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group