Ubuntu SSL 2048 Byte
Ubuntu SSL 2048 Byte
Ubuntu SSL 2048 Byte
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 server.key -out server.csr
Enter pass phrase for server.key:
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 server.csr -signkey server.key -out server.crt
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:
example.com.crt
gd_bundle.crt
server.csr
server.key
You will use three of those files, so copy them to the proper location.
SSLCertificateFile /etc/ssl/certs/example.com.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
SSLCACertificateFile /etc/apache2/ssl.crt/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 192.168.3.45:443>
ServerAdmin webmaster@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/ssl_access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.com.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
SSLCACertificateFile /etc/apache2/ssl.crt/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