Generating SSL Certificates for Apache

29Apr 2011

Generating SSL Certificates for Apache

by Craig Mayhew on Fri 29th Apr 2011 under General/Techie
Generate a key:

openssl genrsa -des3 -out server.key 2048


Generate a certificate signing request (csr):

openssl req -new -key server.key -out server.csr

Country Name (2 letter code) [GB]:GB
State or Province Name (full name) [Berkshire]: Hampshire
Locality Name (eg, city) [Newbury]: Southampton
Organization Name (eg, company) [My Company Ltd]:Your Company Ltd
Organizational Unit Name (eg, section) []:Information Technology
Common Name (eg, your name or your server's hostname) []:craig.mayhew.io
Email Address []:[email protected]
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:


Remove the password from the key file:

cp server.key server.key.bak
openssl rsa -in server.key -out server.key


SSL Certificates  


© 2005-2024 Craig Mayhew