Language / Dil
All Posts Domain Names Business Email SSL Certificates Hosting Trademark Registration Metutech.Design AI-Powered Website Builder ↗ More Back to metunic.com.tr
SSL Certificates

How to Generate a CSR for an Apache Web Server Using OpenSSL?

We walk you through generating a private key and CSR with the OpenSSL command on your Apache server. We explain which details to enter and how to add the CSR text to your certificate order.

2 min read

Contents
  1. Generating a CSR Using OpenSSL for an Apache Web Server
  2. 1. Log In to Your Server
  3. 2. Run the CSR Generation Command
  4. 3. Enter Your Information
  5. 4. Copy the CSR Text
  6. 5. Complete the Order

Generating a CSR Using OpenSSL for an Apache Web Server

This guide will walk you through the process of generating a CSR (Certificate Signing Request) using OpenSSL for Apache. To learn why CSRs and your private key are important, see our CSR Overview article. If you have already generated your CSR and received your trusted SSL certificate, you can check our SSL Installation Instructions page and skip the steps below.

1. Log In to Your Server

Log in to your server's terminal via Secure Shell (SSH).

2. Run the CSR Generation Command

Run the following command to generate a private key and a CSR:

How to Generate a CSR for an Apache Web Server Using OpenSSL? – image 1
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

Note: Replace the "server" part with the domain name you want to secure.

3. Enter Your Information

During the process, you will be asked to enter the following information:

  • Common Name: The fully qualified domain name (FQDN) you want to secure with the certificate. For example, www.orneksite.com, guvenli.site.org, *.alanadi.net.
  • Organization: Your company's official legal name and corporate designation.
  • Organizational Unit (OU): The name of the relevant department, for example 'Information Technology' or 'Web Security'.
  • City or Locality: The city where your organization is legally registered. Do not use abbreviations.
  • State or Province: The state or province where your organization is legally registered. Do not use abbreviations.
  • Country: The two-letter country code where your organization is legally registered (e.g. TR, US, DE).

Note: You are not required to enter a password or passphrase. This field is optional and can be used to provide additional security for your key pair.

4. Copy the CSR Text

Open the CSR file you generated with a text editor (for example, Notepad) and copy all the text, including the following sections:

-----BEGIN CERTIFICATE REQUEST-----
...
-----END CERTIFICATE REQUEST-----
How to Generate a CSR for an Apache Web Server Using OpenSSL? – image 2

Note:

  • Your CSR file will be stored in the user directory you connected to via SSH, unless otherwise specified.
  • We recommend that you store or back up your generated .key file securely for later use.

5. Complete the Order

Return to the Certificate Generation Form on our website, paste the CSR you copied into the relevant field and complete the generation process.

After you generate your CSR, your order will be put into the validation process by the certificate provider (Certificate Authority – CA). Depending on the type of certificate you purchased, the person requesting the certificate will need to complete a specific validation step.

Was this article helpful?

Still stuck? Our support team is here to help. Tell us your question and our experts will help you.

Help & Support
SSL Certificates

You may also like