Thursday, November 4, 2010

Configuring SSL (Godaddy) for Apache 2.X

While configuring SSL you will need to provide Certificate Signing Request (CSR).

Steps to generate CSR can be found on below url:
http://help.godaddy.com/topic/746/article/5269

Steps are also described below:

Creating a CSR (required while registering ssl certificate)

Create a directory /usr/bin/ssl/ where your csr files will be stored.

Type below command from the shell:

1 . cd /usr/bin/ (/your path to openssl/)
which will change your directory to the one which is going to store the CSR files.
Then type below command on shell
2. openssl genrsa -des3 -out .key 2048
Replace with the name which you want.
3. openssl req -new -key .key -out .csr
Replace with the name which you want.
The above two commands will create a .key and .csr file at the location which you have specified above.

Note – while creation of a CSR you will be asked the details about organization.
Once the certificate is registered you will get two files with .crt extension. Place these two files in the same directory as the one which you have created while CSR.



Now for apache server configuration:
Go to /etc/httpd/conf.d folder where you will find a ssl.conf file.

In ssl.conf file you will find below lines
SSLCertificateFile – replace the path of your SSL certificate file (from above e.g. /usr/bin/ssl/yourcertificate.crt)

SSLCertificateKeyFile - replace the path of your SSL key file (from above e.g. /usr/bin/ssl/key.crt)

SSLCertificateChainFile – replace with the path of 2nd .crt file which you got after registering the certificate. (its generally named as gd_bundle.crt) (from above e.g. /usr/bin/ssl/gd_bundle.crt)

1 comment:

James said...

I've got an interview for a company specialising in internet security so I've been trying to find as much information as possible. Thanks for the post, I was told to look into whatever I could find out about the apache ssl certificate because my friend was quizzed about it in his interview and unfortunately he hadn't revised the topic.