Let's enable mod_ssl so that we can communicate over HTTPS. a2enmod seems to be an abbreviation for "Apache2 Enable Module".
sudo a2enmod ssl
The a2enmod command enables loading of the specified module from the available modules.
The activation of the configuration file is completed with just a command without editing the file.
To understand how it works, take a look at the Apache configuration file directory with the ls command. prize.
ls / etc / apache2
It is less than.
apache2.conf conf-enabled magic mods-enabled sites-available conf-available envvars mods-available ports.conf sites-enabled
In "mods-available" there is a file called ssl.conf. Check with ls and grep.
ls / etc / apache2 / mods-available | grep ssl
Certainly there is "ssl.conf".
Let's take a look inside "mods-enabled". This is the configuration file that is actually loaded.
ls / etc / apache2 / mods-enabled | grep ssl
There is "ssl.conf".
You can enable / disable it depending on whether the configuration file exists in "mods-enabled".
It will take effect after restarting Apache.