Bobcares

OpenCart SSL setup – How to secure your online store

by | Aug 4, 2019

Website SSL certificate enhances customer credibility in exchanging their confidential data, such as credit card information.

So, an online store like OpenCart owners always needs an SSL setup on their websites to secure data transfer.

However, users may have problems during OpenCart SSL setup due to an incorrect OpenCart setting, wrong SSL server setting and much more.

At Bobcares, we often get requests from our customers to set up SSL for OpenCart as part of our Server Management Services.

Today, we’ll see how our Support Engineers setup SSL for OpenCart and fix the related errors with it.

 

How we install SSL certificate for OpenCart

Users need to secure their payment gateways in OpenCart via SSL certificate. This can possibly avoid hackers from stealing credit card data.

Normally, it is very easy to set up SSL for OpenCart. However, customers may experience problems while installing an SSL certificate for OpenCart. The common reason being a mismatch in SSL certificate and key files.

So, this may cause problems like SSL not working on website errors,

Here, we’ll see how our Support Engineers install SSL certificate without any errors.

1. In most cases, customers directly buy an SSL certificate from their chosen SSL provider. We begin the process by collecting the website details and generating the CSR. Further, we collect the SSL certificate files from the customer and set up SSL for the domain. This requires Webserver configuration edit and restart too.

2. Then, we login into OpenCart to activate the SSL on OpenCart.

3. Next, we go to System> settings> Edit store.

4. From the given interface, we go to Server tab and Switch on Use SSL.

5. After that, we change the path to https on the root config file. So, we can use SSH or FTP to connect to the server and switch to website content folder.

Again, we open the config.php file to edit the path.

we find a line, define(‘HTTPS_SERVER’, ‘http://bobcares.com/’); and change to define(‘HTTPS_SERVER’, ‘https://bobcares.com/’);

6. Also, we repeat the same step 5 for the config.php file in the Admin folder. OpenCart holds config.php at both the admin folder and main website too.

7. Finally, we save the changes.

That’s it!

 

Common problems after setting up SSL for OpenCart

From our experience in managing servers, we’ve seen customers facing different kinds of problems with OpenCart SSL. Even after enabling SSL, the site may still show up as insecure.

Let’s see how our Support Team solve common SSL errors.

 

1. Incorrect OpenCart settings

Recently, one of our customers had a problem with their OpenCart site after installing SSL. His SSL was not working and showed a red strikeout over the https.

On checking, our Support Engineers found that the config.php and /admin/config.php file configurations were different. The settings in both files should match to make SSL work.

So, we edited the settings in both files and SSL started working properly.

 

2. Wrong SSL server settings

Yet another reason for OpenCart SSL setup could be wrong SSL server setting.

Often, customers make mistakes while installing SSL on the server. They may specify the directory path incorrectly in the SSL configuration file.

As a result, the website shows a broken padlock or a red strikeout over the https which means the SSL setup for that domain went incorrect.

In such cases, our Support Engineers solve the issue by correcting the directory path of OpenCart in the SSL configuration file as follows.

<IfModule mod_ssl.c>
<VirtualHost *:443>

ServerAdmin webmaster@localhost
ServerName DOMAIN.com
DocumentRoot /var/www/DOMAIN.com

 

3. Rules in .htaccess file

By default, OpenCart SSL will automatically switch to https on checkout. Sometimes, it may not work with some domains. Then, we have to use a .htaccess file to specify the specific RewriteRule.

Similarly, another customer had SSL problems on checkout account pages. The https didn’t work on those pages, even though he followed all the steps to enable SSL.

So our Support Engineers added the following rule in .htaccess as follows.

#Force https redirect
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(checkout|account) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} !=off

 

[Having trouble while setting up SSL in OpenCart? We’ll fix it for you.]

 

Conclusion

In short, OpenCart SSL setup will be successful only with proper OpenCart settings, SSL server settings and so on. Today, we saw how our Support Engineers enable SSL for OpenCart and fix related errors.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.