How to install SSL certificate on ubuntu(Magento)

Step1) Change to the Apache SSL Certificate directory:

cd /etc/apache2/ssl

OR

If it doesn’t exist then create it:

sudo mkdir /etc/apache2/ssl

Step2). You need three files:

– The public key provided by the Certificate Authority
– The Private key from your server which you created and submitted to the Certificate Authority
– The Intermediate or Chain Certificate provided from your Certificate Authority

Move them all to the /etc/apache2/ssl directory and name them appropriately

Step3) . Modify your virtual hosts file and add the config to listen on port 443:

<VirtualHost *:443>

ServerName your_domain.com
DocumentRoot /var/www/html/path_to_your_site
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/your_domain_public.crt // The Public Key provided from the Certificate Autority
SSLCertificateKeyFile /etc/apache2/ssl/your_domain_private.key // The key you created initially (probably using OpenSSL and submitted to the Certificate Authority)
SSLCertificateChainFile /etc/apache2/ssl/your_domain_intermediate.crt // The Intermediate Certificate provided from the Certificate Autority

<Directory /var/www/html/path_to_your_site/>
AllowOverride All
</Directory>

</VirtualHost>

Step4) Restart the Apache service using

Now you should be able to navigate to load your site using HTTPS but depending on your CMS or Shopping Cart platform you may need to make a config change in the admin area to force it to use HTTPS.

Magento

To change this in Magento navigate to:

System->Configuration->General->Web->Unsecure and System->Configuration->General->Web->Secure

Screenshot-from-2015-05-30-144137.png

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s