Skip to main content
Topic: Going https (Read 2650 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Going https

Hey gang!  Interested in venturing into new territory here.  Reading through the other ssl thread here got me considering the possibility.   In this case the cert would be for multiple domains on a Centos 6 CPanel VPS .  Now, for the ssl cert stupid, could someone explain the process in detail?  What is the easiest way to install on said server?  Can this be done through CPanel? Cheap (free?) is desired.  Thanks!


Re: Going https

Reply #2

Here is a tidbit.  It's a cpanel plugin.  Super easy installation.  It works like a charm too. 

https://github.com/Prajithp/letsencrypt-cpanel

It doesn't get any easier than that!

Re: Going https

Reply #3

Got this up and running on a few sites.  Works swell for the most part.  After the certificate is installed, all url settings in the Admin panel need updating.  Things such as avatar urls, smileys, themes, etc.  

One site has a different issue.  This site is an inherited one.  The former owner edited the $scripturl in Querystring.php, replacing /index.php with /content.  URLs have a much nicer appearance.  However, the SSL URLs don't want to see the /content portion.  Anyone know what can be done?  htaccess rewrite rule?  Admittedly that is not a strong suit.  
Last Edit: July 12, 2016, 01:57:45 pm by badmonkey

Re: Going https

Reply #4

It would be hard to guess. Temporarily, just backup that file and restore default in its place.


Re: Going https

Reply #6

Have you fixed all the urls to https? If you did, you need to go through your Querystring.php file and file all modifications made to it. May be it had specified the forum to use http instead while changing index.php to /content/.

Alternatively, you may try to force elkarte to change all its url from non-ssl to ssl[1]as follows:

Code: [Select]
		$mesfa = array();
// SSL and non SSL url fixes in others
$url_nossl = 'http://' . $_SERVER['SERVER_NAME'];
$url_ssl = 'https://' . $_SERVER['SERVER_NAME'];
if (empty($_SERVER['HTTPS'])) {
$mesfa[$url_ssl] = $url_nossl;
} else {
$mesfa[$url_nossl] = $url_ssl;
} // Now let's change necessary things
return str_replace(array_keys($mesfa), array_values($mesfa), $buffer);

This can be made into a simple fully hook addon calling your(&$buffer) function.
I have tested this code in the latest version of MESFA addon

Re: Going https

Reply #7

Thanks!  I will try this tomorrow.