How to generate an SSL certificate CSR for apache on CentOS

Here's a simple command sequence to generate a CSR (Certificate Signing Request)
OS : RHEL / CentOS / Scientific Linux
Certificate Authority : StartCom / StartSSL
sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/$site.key -out /etc/pki/tls/private/$site.csr -subj "/C=GB/ST=London/L=London/O=Example Org/OU=Example Department/CN=$site"
sudo cat /etc/pki/tls/private/$site.csr

This assumes that your certificate authority doesn't care about the contents of the CSR (as StartSSL doesn't)

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.