How to Generate a CSR for Nginx (OpenSSL)

Overview

The following lesson will guide you through the CSR generation process on Nginx (OpenSSL).

What is CSR?

A Certificate Signing Request (CSR code) is a block of encoded text that contains the information about the organization that applies for an SSL certificate, and the domain that needs to be secured. A CSR is what you give to the Certificate Authority to generate your SSL certificate. It is an essential part of obtaining an SSL certificate.

Generate a CSR for Nginx (OpenSSL)

  1. Log in to your server’s terminal, via Secure Shell (SSH).
  2. Generate a private key and CSR by running the following command:
    openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

    Note: Replace “server ” with the domain name you intend to secure.

  3. Enter the following CSR details as follows:
    • Common Name: domain.tld (Use the actual certificate domain).
    • Organization: Organization name
    • Organization Unit (OU): IT Department
    • City or Locality: Tripoli
    • State or Province: Tripoli
    • Country: LY
  4. Locate and open the newly created CSR in a text editor such as Notepad and copy all the text (including BEGIN CERTIFICATE REQUEST and END CERTIFICATE REQUEST) to use it for SSL generation.
Share this:
FacebookTwitterWhatsAppViberCopy LinkTelegramLinkedIn
Updated on October 20, 2021

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support