I use this syntax to generate the CSR:
Code:
openssl req -newkey rsa:2048 > new.cert.csr
openssl rsa -in privkey.pem -out new.cert.key
COMMON NAME should be the name of the web site. Enter any password for the first command, and then re-use it on the second command. The second line removes the passphrase from the privkey so it can be used on webservers
You will get back the cert file your SSL cert vendor. Let's call this "new.cert.cert" for this example.
Now with Apache you can use it:
Code:
SSLCertificateFile _path_to_/new.cert.cert
SSLCertificateKeyFile _path_to_/new.cert.key
If you need intermediate keys and CA stores (eg with startssl.com)
Code:
SSLCertificateChainFile _path_to_/sub.class1.server.ca.pem
SSLCACertificateFile _path_to_/ca.pem
Similar commands are available for other webservers (eg nginx); check the documentation.