Going Secure

I setup an SSL-enabled Apache server on Lightsail today in 15 minutes. I would have spent less time on it if I had gone directly to Let’s Encrypt, but I’ll share the steps in case anyone wants a quick-and-easy SSL-enabled web server. I’m using Ubuntu 16.04.3 LTS so… you’re mileage may vary.

  1. Add the certbot repo:

    sudo add-apt-repository ppa:certbot/certbot

  2. Update:

    sudo apt-get update

  3. Install the certbot:

    sudo apt-get install python-certbot-apache

  4. Modify your site conf for SSL:

    sudo vi /etc/apache2/sites-enabled/000.example.conf

    <IfModule mod_ssl.c>
    <VirtualHost *:443>
    ServerAdmin webmaster@example.com
    ServerName example.com
    ServerAlias www.example.com

  5. Run the certbot:

    sudo certbot --apache -d example.com -d www.example.com

After that you agree to some terms, answer some questions (my shortcut for this is A, N, Enter, 2), and BOOM! You have an SSL-enabled web server too! You might not even need steps 2 and 4 but I did ’em anyway and it didn’t hurt.