Welcome to Geeklog Monday, July 23 2018 @ 01:42 am EDT

Geeklog Forums

Add SSL and HTTPS in Geeklog


OMAL

Anonymous
working
I want to add SSL and HTTPS on my Geeklog site, any adivice and document(info)?

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1292
Just did this not to long ago for one of my sites:

1) Make sure your https is setup correctly for your domain (https://www.ssllabs.com/ssltest/)
2) Make sure any images referenced directly in articles, templates, comments etc use HTTPS. If not this will create insecure warning on the page
2) Update in the Geeklog Configuration the Site URL, Admin URL. Set Cookie Secure = true
3) Setup appropriate redirects for http to https in .htaccess
4) Update Google Search Console with your new protocol to your site.
5) Test your site
One of the Geeklog Core Developers.

OMAL

Anonymous
Thanks Laugh.

Status: offline

ivy

Forum User
Full Member
Registered: 25/11/04
Posts: 301
Location:Tokyo Japan
If you want to make your web site ssl and non-ssl, change lib-common.php. https://wiki2.geeklog.jp/index.php?title=SSL%E3%81%A8%E4%B8%A1%E6%96%B9%E3%81%A7%E9%81%8B%E7%94%A8%E3%81%99%E3%82%8B from:
PHP Formatted Code
$_CONF = $config->get_config('Core');
to:
PHP Formatted Code

$_CONF = $config->get_config('Core');

// SSL and non-SSL
$request_type = (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == '1' || strstr(strtoupper($_SERVER['HTTP_X_FORWARDED_BY']),'SSL') || strstr(strtoupper($_SERVER['HTTP_X_FORWARDED_HOST']),'SSL')) ? 'SSL' : 'NONSSL';
$_CONF['site_url_nonssl'] = 'http://○○○○○○';
$_CONF['site_url_ssl'] = 'https://○○○○○○';
if( $request_type == 'SSL'){
  $_CONF['site_url'] = $_CONF['site_url_ssl'];
  $_CONF['layout_url']     = $_CONF['site_url'] . '/layout/' . $_CONF['theme'];
  $_CONF['site_admin_url'] = $_CONF['site_url'] . '/admin';
}
 

Geeklog Japan https://www.geeklog.jp

All times are EDT. The time is now 01:42 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content