The following steps are necessary to allow a server web to accept HTTPS requests.
Generate a new SSL certificate from a RSA key dedicated to the application by running the following command:
The following steps are necessary to allow a server web to accept HTTPS requests.
Generate a new SSL certificate from a RSA key dedicated to the application by running the following command:
As root user
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
Activate the SSL module in Apache2 by running the following command:
As root user
a2enmod ssl
Configure the port 443 by editing the following file:
As root user
/etc/apache2/sites-available/default
Add the following lines:
<VirtualHost *:443>
...
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.key
...
</VirtualHost>
Restart Apache by running the following command:
As root user
systemctl restart apache2