Friday, July 31, 2015

SSL Configurations for Apache2

SSL Configurations for Apache2

A SSL certificate is a way to encrypt a site's information and create a more secure connection. Additionally, the certificate can show the virtual private server's identification information to site visitors. Certificate Authorities can issue SSL certificates that verify the server's details while a self-signed certificate has no 3rd party corroboration.

SSL support actually comes standard in the Ubuntu 14.04 Apache package. We simply need to enable it to take advantage of SSL on our system.
Enable SSL Module is enabled by command,sudo a2enmod ssl

After you have enabled SSL, you'll have to restart the web server for the change to be recognized:
sudo service apache2 restart

creating a subdirectory within Apache's configuration hierarchy to place the certificate files
sudo mkdir /etc/apache2/ssl

we have our certificate and key available, we can configure Apache to use these files in a virtual host file. You can learn more about how to set up Apache virtual hosts here.
Instead of configure 000-default.conf file,configure default-ssl.conf that contains default ssl configurations.Edit the file with following configurations.

SSLEngine on
SSLCertificateFile    /etc/apache2/sslDummy.crt
SSLCertificateKeyFile /etc/apache2/ssl/Dummy.key
SSLCACertificateFile /etc/apache2/ssl/DigiCertCA.crt

Now that we have configured our SSL-enabled virtual host, we need to enable it.
We can do this by typing:
sudo a2ensite default-ssl.conf
then need to restart Apache to load new virtual host file:
sudo service apache2 restart

No comments:

Post a Comment