Generate a certificate signing request for an SSL server

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.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

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.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply