SSL / HTTPS has become a hard requirement nowadays. The following article is helpful to people who use Apache as a webserver.
Commands to run for Apache, in Ubuntu 16.04:
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python-certbot-apache
sudo certbot --authenticator standalone --installer apache --pre-hook "apachectl -k stop" --post-hook "apachectl -k start"
sudo certbot renew --dry-run
At some point you will be asked if you want HTTP to redirect to HTTPS. If yes, then the apache configuration file will be modified with something similar to this:
RewriteCond %{SERVER_NAME} =yourserver.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Code language: JavaScript (javascript)
Apart from your existing configuration files, special files will be created for the ssl configuration.
Also, remember to open the 443 port, if needed: sudo ufw allow 443/tcp
Sources:
- https://letsencrypt.org/getting-started/
- https://certbot.eff.org/#ubuntutyakkety-apache
- https://www.ericluwj.com/2017/02/23/install-free-lets-encrypt-ssl-certificate-in-webmin.html
- https://askubuntu.com/questions/500175/how-can-i-open-port-443
- https://www.ssllabs.com/ssltest/analyze.html?d=draghici.net&latest
- https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04