SSL certificate is used to encrypt the communication between the server and the clients. The SSL certificate is highly recommend when you transmit confidential data over Internet. Installing SSL in a server is easy if you are using any control panels like, cPanel, Plesk etc. In this tutorial am installing an SSL certificate in a Developer VPS without any control panels.


In this tutorial am assuming that you have already configured an Apache webserver in your Centos Machine.

Create a CSR:

Install Openessl package to support SSL feature in Apache.

yum install mod_ssl

Now create a private key (used to identify the server)

openssl req -new -key -out

Issue the below commands to create a CSR

openssl req -new -key <private key file name>.key -out <csr file name>.csr

Follow the instruction given in the screen. Always use common name with “www”. otherwise you won’t be able to use SSL with www.yourdomain name

NOTE: Please do not enter an email address, challenge password or an optional company name when generating the CSR.

Installing SSL.

Generate a Certificate from a signing authority(Geotrust,Comodo etc). Many companies are providing trial ssl. You can try installing one.

Now make a sub directory in httpd directory to copy the keys.

mkdir /etc/httpd/ssl

Copy the private key and the SSL certificate to this location.

Edit the Apache SSL configuration file

vim /etc/httpd/conf.d/ssl.conf

Add the below contents.

SSLEngine on

SSLCertificateKeyFile /etc/httpd/ssl/ (the private key generated in the server)

SSLCertificateFile /etc/httpd/ssl/ (Certificate from signing authority)

Restart the httpd service

service httpd restart

Verify the installation in any SSL checker wesbistes: You can try

The certificate can also be verified from the browser.

===========thats all……..:)

Leave a Reply

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