OpenSSL installed and updated (should be installed by default)
apt-get update
apt-get upgrade opensslApache will be our HTTPS server. To install it, run the following:
apt-get install apache2Enable the Apache SSL module
a2enmod sslThe default Apache website comes with a useful template for enabling SSL, so we will activate the default website now
a2ensite default-sslConfigure Apache to Use SSL
Edit server configuration file
nano /etc/apache2/sites-enabled/default-ssl.confLocate the section that begins with <VirtualHost _default_:443>.
Add a line with your server name directy below the ServerAdmin email line. This can be your domain name or IP address:
ServerAdmin webmaster@localhost
ServerName example.com:443Find the following two lines, and update the paths to match the locations of the certificate and key. If you purchased a certificate or generated your certificate elsewhere, make sure the paths here match the actual locations of your certificate and key:
SSLCertificateFile /etc/apache2/ssl/apache.crt
SSLCertificateKeyFile /etc/apache2/ssl/apache.keyRestart Apache to put these changes into effect
service apache2 restart
Nessun commento:
Posta un commento