Create your private certificate authority (CA)
Creating a private CA can be useful if you have a lot of services encrypting data for internal use but don't need the domain to be verified by a public CA like Verisign, Thawte etc. By importing the CA to all computers that will use these services users won't get the a popup in IE and Firefox saying that the certificate is invalid.
1. Create a CA certificate
Create a private key for your CA:
openssl genrsa -des3 -out ca.key 4096
Request and install SSL using Apache2 and OpenSSL
First we'll need to create a certificate signing request (CSR) containing the certificate application info and a private key. Make sure you don't expose you're private key (test.com.key) to the public or the safety of the encrypted information could be compromised.
mkdir /etc/apache2/ssl
cd /etc/apache2/ssl
openssl req -new -nodes -keyout test.com.key -out test.com.csr