Installing SSL Certificate on Apache 2.4.9


My SSL Certificate is already active. How do I install it?


1. Connect to your host ;
2. Turn on SSL mod:
sudo a2enmod ssl
3. Check your config path
 apachectl -S
4. Open your config, e.g. in Ubuntu path would be:
5. To set up a virtual host for HTTPS (port 443) include the following into your configuration.
Don't forget to include files to correct folders.
Save configuration.
<VirtualHost *:443>
ServerName (replace with your domain)
DocumentRoot /var/www/
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
SSLCertificateChainFile /etc/ssl/certs/
5. Here's an explanation of directives
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem - this is a pem certificate for site itself
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key - your private key
SSLCertificateChainFile /etc/ssl/certs/ - bundle from downloaded archive (obsolete since 2.4.8, you can comment it by adding "#" before SSLCertificateChainFile or leave it but it won't affect configuration)
6. Check config syntax after you've changed configuration:
apachectl -t

7. Restart Apache service:

sudo service apache2 reload

Changes will affect immediately.

Was this article helpful?
1 out of 1 found this helpful
Additional questions? Submit a request