TLS/SSL Certificate on Linux and Open SSL
Installation of an SSL certificate on an Apache / Linux Server Step-by-step description
How to create a folder structure for your certificates
The principle is that you generate a private and public key for your desired domain.
In this example, you have generated a CSR for the domain http://mydomain.com . Once you have received the certificate on your email, you must save the contents in two separate files. One for theSSL- certificate, and another one CA (intermediate).
For example mydomain.com.crt and intermediate.crt
It is highly recommended that the folders which contain the private key must be available only for root. To do this, use the following command:
# chmod -R 0600 /etc/apache2/ssl
Only root may now access the private key. And last, you must enable the private and public key by configuring preferences in the correct virtual Host.
SSLCertificateFile /etc/apache2/ssl/mydomain.com/my.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
SSLCertificateChainFile /etc/apache2/ssl/intermediate.crt
For more information on the configuration, please use the link below:
http://httpd.apache.org/docs/2.0/ssl/