OpenSSL – Generate Certificate Signing Request for SSL Server

apache-httpdhttpsopensslssl

I'm running CentOS 6.2 LAMP and I've just purchased an SSL certificate via Namecheap that I'm trying to install on my server. This is the certificate I purchased.

How do I complete this process without the use of a web host?

So far, I have installed SSL using yum install mod_ssl openssl and I am now being asked for a CSR via NameCheap and to choose my Server type.

Are mod_ssl and openssl both in there for Apache2?

enter image description here

What is a CSR and how do I generate one?

The tutorials I've found online are all using self signed certificates, which is not what I want.

Best Answer

Okay so I solved this myself. Unfortunately most of the common documentation on the internet says "As your host to request the CSR". Of course my host is myself so I had to register the code myself on my server.

I established a SSH connection to my server and ran the following command.

openssl req -nodes -newkey rsa:2048 -keyout myserver.key -out server.csr

Replace 'myserver.key' and 'server.key' with relevant names of your choice. (keep the extensions).

Upon running that command you are then asked several questions:

Country Name (2 letter code) [AU]: 
State or Province Name (full name) [Some-State]: 
Locality Name (eg, city) []: 
Organization Name (eg, company) [Internet Widgits Pty Ltd]: 
Organizational Unit Name (eg, section) []: 
Common Name (eg, YOUR name) []: 
Email Address []:

Fill this information in and continue, - you'll then be asked for a pass phrase and given the option to choose the company name again.

After this two files are added to your server, usually in the user's home folder. I was logged in as root so they appeared within the "root" folder.

I opened the .csr file with a notepad and copied the contents, I then pasted this in to the NameCheap CSR generation page and continued the wizard.

The rest is self explanatory and I followed other online guides on how to configure the certificates once I had been emailed them from Comodo.

Related Question