Configuring Apache with TLS
These days, installing Apache with TLS is easier than ever, although the specific process can vary from distribution to distribution due to differences in configuration layout. Let's look at two of the current major examples.
How to do it…
Let's start installing and configuring on Ubuntu 14.04:
Install the package:
sudo apt-get install apache2
Enable the SSL modules and stock SSL configuration:
sudo a2enmod ssl sudo a2ensite default-ssl
Add the appropriate SSL certs to the machine. The private key file should be delivered to
/etc/ssl/private
while the public certificate and relevant intermediate certs should be delivered to/etc/ssl/certs
.Update the Apache configuration to point to the correct certs. Edit
/etc/apache2/sites-enabled/default-ssl.conf
in the editor of your choice and update theSSLCertificateFile
andSSLCertificateKeyFile
variables to point to your new cert and key. If you're hosting your own internal CA, you'll want to uncommentSSLCertificateChainFile...