Ubuntu SSL 2048-bit Certificate Setup
Ubuntu SSL 2048-bit Certificate Setup
An official SSL Certificate is required in order to satisfy browsers and customers on a web site.
A Certificate Signing Request (CSR) must be created that contains the public key of the web site
that will be installed in the certificate. This key identifies the owner of the web site and this is the
information that you see when you view a certificate:
The CSR must be sent to a Certifying Authority (CA) who will then convert the certificate into a real
Certificate which can be placed on the server with the signature of the signing authority. In this
process the signing authority verifies the company is who they say they are on the certificate.
It is important to create a backup of both the key and the password, or you may have to do the
process all over again.
- – - cut – - -
Create a Certificate Signing Request with the server’s RSA private key
sudo openssl req -new -key [Link] -out [Link]
Enter pass phrase for [Link]:
You are about to be asked to enter information that will be incorporated into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
—–
sudo openssl x509 -req -days 365 -in [Link] -signkey [Link] -out [Link]
Send the request to a Certifying Authority.
Once the certificate is signed by the CA and returned to you the details may be viewed with this
command:
[Link]
gd_bundle.crt
[Link]
[Link]
You will use three of those files, so copy them to the proper location.
SSLCertificateFile /etc/ssl/certs/[Link]
SSLCertificateKeyFile /etc/ssl/private/[Link]
SSLCACertificateFile /etc/apache2/[Link]/gd_bundle.crt
Now modify your domain name in the /etc/apache2/sites-enabled. Make sure your SSLEngine is set
to on.
<IfModule mod_ssl.c>
<VirtualHost [Link]:443>
ServerAdmin webmaster@[Link]
ServerName [Link]
ServerAlias [Link]
DocumentRoot /var/www/[Link]/
ErrorLog /var/log/apache2/[Link]
CustomLog /var/log/apache2/ssl_access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/[Link]
SSLCertificateKeyFile /etc/ssl/private/[Link]
SSLCACertificateFile /etc/apache2/[Link]/gd_bundle.crt
</VirtualHost>
</IfModule>
Now restart apache and be ready to enter the SSL pass phrase you created. This pass phrase will
be needed whenever you restart the server