Configuring your Joomla website to use SSL

joomlaFor some websites, you'll want them to use SSL, so that all the traffic on the site is encrypted.  Particularly important if the site is used for financial transactions.

This article describes how to do this using the Siteground SSL Certificate, using the example of secure.mysite.com.


Subdomains

Before you get started, please note that you need to have the exact sub-domain as a symlink or a folder inside of the primary domain folder (for the SSL).

In order to do that, you can create the symlink by running the following command through SSH in the folder: /home/Addons/mysite.com where the domain for the SSL resides.

ln -s /home/Subdomains/mysite.com/secure/ secure

Note that if you are unsure how to create this symlink you can post a new ticket at Siteground and they will do it for you (for other sub-domains you wish to use through the secure connection).

Note, that adding a symlink, does not affect the Akeeba Backup on ras.ac.uk. In other words the symlinked /secure folder is not included when backing up using Akeeba Backup in the primary domain folder.

 

Joomla websites

Firstly you need to edit the htaccess.txt file in your preferred File Manager.

  1. Browse to the root directory for the website.
  2. Rename the htaccess.txt file to .htaccess.
  3. Open the file for editing.
  4. Add the following content to the top of the file.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Now that the file is .htaccess, you can enable URL rewriting in Joomla. This will remove the index.php from the browsers address bar, and is good SEO practice.

  1. Login to the back-end of Joomla.
  2. Go to System > Global Configuration.
  3. Select the Site tab.
    1. Under SEO settings, enable Use URL rewriting.
  4. Select the Server tab.
    1. For the Force SSL option, choose Entire site.

 

Moodle sites

  1. Navigate to the config.php file in the File manager.
  2. Look for the line 17 (on default config files) that shows:
$CFG->wwwroot = 'http://secure.ras.ac.uk';

Change the http:// to https:// like the following:

$CFG->wwwroot = 'https://secure.ras.ac.uk';

Next, Set up a redirect in your .htaccess file, by placing the following code to force the https:// redirect.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://secure.ras.ac.uk/$1 [R,L]

 

ownCloud

l;kasjf;lkasjdf

Thanks for visiting.