Test your Programming knowledge

50% users failed to get the best score. It's your turn to test now.
Questions curated by the expert mentors at codzify.com

Start Quiz


How to manually install an SSL certificate on my Apache Server Ubuntu ?

1 min 27 sec

After your certificate request is approved, you can download your certificate from the SSL manager of your hosting provider.  Finally install it on your Apache server.

We usually recommend the Bigrock hosting service. It is one of the leading Domain Registration and Server Hosting Provider. Get a Flat 10% Off on SSL Certificate today.

To install it, you have to follow the following steps:

1) Upload the intermediate certificate (gd_bundle.crt or similar) and primary certificate(.crt file with randomized name) into your server folder. 

2) Find your Apache configuration file.
     On default configurations, you can find a file named 000-default.conf in /etc/apache2/sites-enabled folder.

3) Open this file with your favorite text editor.

       sudo nano 000-default.conf 

4) Inside your 000-default.conf file, find the block.

5) To make your connection secure to HTTPS, add this below the existing block

    DocumentRoot /var/www/coolexample
        ServerName coolexample.com www.coolexample.com
        SSLEngine on
        SSLCertificateFile /path/to/coolexample.crt
        SSLCertificateKeyFile /path/to/privatekey.key
        SSLCertificateChainFile /path/to/intermediate.crt
6) Make sure port 443 is there at the end of your server IP.

The remaining /path/to/.... file locations can be replaced with your certificates folder and file names.

7) Now, run the following command to check your Apache configuration file for error:

     apache2ctl configtest

8) If it returns a Syntax Ok response, run the following command to restart Apache server:

sudo service apache2 restart

Recommended Articles

Did you found this article helpful?

Try to execute what you have learnt

Easy to use online data structure compiler where you can execute the programs in your favourite programming language.
(C, C++, Python)

Open Compiler

HTML, CSS and Javascript Real time Web Editor

Execute your HTML, CSS and javascript code in real time with the web editor
(HTML, CSS, Bootstrap, Javascript)

Open Web Editor