Apache: Generate CSR (Certificate Signing Request) | SSL Certificates – GoDaddy Help GB

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr

Replace yourdomain with the domain name you’re securing. For example, if your domain name is coolexample.com, you would type coolexample.key and coolexample.csr.

Open the CSR in a text editor and copy all of the text.

Paste the full CSR into the SSL enrollment form in your account.

Apache: CSR & SSL Installation (OpenSSL) (digicert.com)

<VirtualHost 192.168.0.1:443>
    DocumentRoot /var/www/html2
    ServerName www.yourdomain.com
        SSLEngine on
        SSLCertificateFile /path/to/your_domain_name.crt
        SSLCertificateKeyFile /path/to/your_private.key
        SSLCertificateChainFile /path/to/DigiCertCA.crt
    </VirtualHost>

Now test it

apachectl configtest

apachectl stop
apachectl start