32.9 Configuring Apache for HTTPS
By default, the Apache server does not include the necessary module to implement a secure HTTPS web site. The first step, therefore, is to enable the Apache mod_ssl module on the server system as follows:
# a2enmod ssl
Restart httpd after the installation completes to load the new module into the Apache server:
# systemctl restart apache2
Check that the module has loaded into the server using the following command:
# apache2ctl -M | grep ssl_module
ssl_module (shared)
Once the ssl module is installed, repeat the steps from the previous section of this chapter to create a configuration file for the website, this time using the sites-available/default-ssl.conf file as the template for the site configuration file.
Assuming that the module is installed, the next step is to generate an SSL certificate for the web site.