Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Sat Apr 20, 2024 10:25 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
 Post subject: SSL tips
PostPosted: Fri Jun 15, 2012 8:05 am 
Offline
Newbie

Joined: Fri Jun 15, 2012 3:46 am
Posts: 13
Any tips on enabling SSL with oav2?

Thanks!
-D


Top
 Profile  
Reply with quote  
 Post subject: Re: SSL tips
PostPosted: Fri Jun 15, 2012 11:45 am 
Offline
Newbie

Joined: Fri Jun 15, 2012 3:46 am
Posts: 13
Sorry, to be more specific, I mean how to enable https links in OAv2. I've got the cert added to apache and all that good stuff. I can even pull up the login page using https, but all subsequent links redirect back to the http version. Is there a switch to flip? or does it require going through and replacing all the http references in the source?

Thanks


Top
 Profile  
Reply with quote  
 Post subject: Re: SSL tips
PostPosted: Fri Jun 15, 2012 3:53 pm 
Offline
Site Admin
User avatar

Joined: Mon Jun 07, 2004 11:48 am
Posts: 1964
Location: Brisbane, Australia
To be honest, I haven't tried OAv2 + HTTPS.
I definitely need it to work though, so I'm open to any suggestions.
Not having tried it, I have no idea what is/is not happening...

_________________
Support and Development hours available from [url=https://opmantek.com]Opmantek[/url].
Please consider a purchase to help make Open-AudIT better for everyone.


Top
 Profile  
Reply with quote  
 Post subject: Re: SSL tips
PostPosted: Sat Jun 16, 2012 2:23 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
What exact configuration have you done on your OA server instance? I just turned on SSL on my OAv2 and it seems to work fine. Login page redirects to an SSL enabled main page.

Test audit run with data posting also worked.


Top
 Profile  
Reply with quote  
 Post subject: Re: SSL tips
PostPosted: Sat Jun 16, 2012 6:22 am 
Offline
Newbie

Joined: Fri Jun 15, 2012 3:46 am
Posts: 13
It may just be a configuration error with my Http server itself that I need to look into.

In a debian VM, It was automagically able to work with HTTPS as you mention.

In the webserver that was thrust upon me, not so much.
In looking into codeigniter, one of the ways to go ssl is set :

$config['base_url'] = "https://www.yoursite.com/";

at the beginning of /system/application/config/config.php
Which already has some attempt at smart detection:

if(isset($_SERVER['HTTP_HOST']))
{
$config['base_url'] = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'https' : 'http';
$config['base_url'] .= '://'. $_SERVER['HTTP_HOST'];
$config['base_url'] .= isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != '80' ? ( ':'.$_SERVER['SERVER_PORT'] ) : '';
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
}

So I'm guessing this old server(it claims to be a variant of linuxfromscratch) doesn't handle $_SERVER['HTTPS'] properly, cause it defaults to http. How that gets set, I have no idea.
Forcing it to use SSL by changing

$config['base_url'] = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ? 'https' : 'http';

to

$config['base_url'] = 'https';

Has worked for me (submitting and browsing results has been tested so far), while i can try to find out more information.


Top
 Profile  
Reply with quote  
 Post subject: Re: SSL tips
PostPosted: Sat Jun 16, 2012 6:40 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
Maybe check your php config file and see if you've got configs turning off the SERVER super globals.


Top
 Profile  
Reply with quote  
 Post subject: Re: SSL tips
PostPosted: Wed Jun 27, 2012 5:18 am 
Offline
Newbie

Joined: Fri Jun 15, 2012 3:46 am
Posts: 13
Hi,

Sorry for the delay.

Thanks JPA that was it.

-Dl


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Group