Generate a CSR: Apache (Open SSL)

To generate a Key Pair and Certificate Signing Request (CSR), please do the following:

PART 1: Generating the Key Pair


The utility OpenSSL is used to generate both Private Key (key) and Certificate Signing request (CSR). OpenSSL is usually installed under /usr/local/ssl/bin. If you have a custom install, you will need to adjust these instructions appropriately.


Type the following command at the prompt:

openssl genrsa -des3 -out 2048

Please note: If you do not wish to use a Pass Phrase, do not use the -des3 command. It will however leave the private key unprotected.


Enter the PEM Pass Phrase. (This MUST be remembered).


This will generate a 2048 RSA Private Key and store it in the file

PART 2: Generating the CSR


Type the following command at the prompt:

openssl req -new -key -out

Please note:You will be prompted for the PEM Pass Phrase if you included the -des3 command. Type it in now.

Please note: There is a known issue with Apache/OpenSSL Windows Based Installations. If you receive an error with the above command, Please enter the following:

openssl req -new -key -out -config openssl.cnf


Input the information for the Certificate Signing Request. This information will be displayed in the certificate.

Please note:The following characters cannot be accepted: < > ~ ! @ # $ % ^ / \ ( ) ?.,&

  • Country Name (2 letter code) [AU]:GB
  • State or Province Name (full name) [Some-State]:London
  • Locality Name (eg, city) []:London
  • Organization Name (eg, company) [GX Networks Ltd]:Webfusion
  • Organizational Unit Name (eg, section) []:IT
  • Common Name (eg, YOUR name) [] (Must be the FQDN - Fully Qualifed Domain Name)

Important: DO NOT Enter the following:

  • Email Address []:
  • A challenge password []:
  • An optional company name []:

Please verify the CSR, to ensure all information is correct. Use the following command:

openssl req -noout -text -in


The CSR will now be created.


Answer options

Your feedback was successfully added.

Answer tracking


Watch the content of this article for changes.