How to Generate a Certificate Signing Request (CSR) with OpenSSL?

OpenSSL is a common utility used to generate a pair of private key and public Certificate Signing Request (CSR) for Apache web servers. In this tutorial, we will describe the steps to generate a Certificate Signing (CSR) from Apache 2.x web server.

  1. Login to your Linux machine via SSH and type the following command. While issuing the command, don't forget to replace your-domain-name with your actual domain name.

    openssl req -new -newkey rsa:2048 -nodes -keyout your-domain-name.key -out your-domain-name.csr 
  2. This command will generate two files, Private-Key file for the decryption of the SSL Certificate and Certificate Signing Request (CSR) file. You will now be asked to enter following information to generate the CSR key.

    • Common Name: Enter the Fully Qualified Domain Name of your website. When you generate a CSR key for Wildcard SSL, common name must start with * (asterisk). For Example, *.your-domain-name.com.
    • Organization: Enter the legal/registered name of your organization.
    • Organization Unit: Enter  exact section of your organization, if applicable.
    • City or Locality: Enter name of the city where your organization is registered. Do not abbreviate it.
    • State or Province: Enter name of the state or province where your company is located. Do not abbreviate it.
    • Country: Enter two letter ISO (International Organization for Standardization) abbreviation for your country.

  3. Once the necessary information is filled up, you will get your-domain-name.csr and your-domain-name.key files in the folder where the command was run. Open your-domain-name.csr file with a text-editor. Copy CSR key and paste in SSL certificate request page. Similarly, open your-domain-name.key file to get a private key.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to Recompile Apache Using EasyApache in WHM?

You would required to recompile the Apache mainly when you attempt to perform one of the...

Locations of Common Log Files and Configuration Files for cPanel Services

This article covers the configuration file and log file locations of most common cPanel services....

How to speed up website performance using caching solution XCache?

If you are looking for caching solution to speed up the website performance, XCache is one of the...

How to restart Apache to make httpd.conf changes permanent?

When cPanel is updated or Httpd service is restarted using WHM, the custom changes made in the...

How to Upgrade Apache using EasyApache?

In this article we'll discuss how to upgrade Apache using EasyApache tool in WHM. EasyApache is a...