How to Install Let’s Encypt into Apache and Enable HTTPS on Ubuntu

You can install https on apache by follows:

Step 1: Update ubuntu

sudo apt-get update

Step 2: Install git

sudo apt-get install git

Step 3: Install Let’s Encypt Client

sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt

Then we will copy letsencypt into /opt/letsencrypt

Step 4: Move to /opt/letsencrypt

cd /opt/letsencrypt

Step 5: Set domain https

if you domain is:example.com, you plan to set up:

https://examples.com
https://img.examples.com

you can do like this:

./letsencrypt-auto --apache -d example.com -d img.example.com

then application will start to set up, you may have to enter you email or some other information in process.

Step 6: Check https is active

open url:

https://www.ssllabs.com/ssltest/analyze.html?d=example.com&latest

Step 7:  set up renew Let’s Encrypt

./letsencrypt-auto renew

Then you will open your website by https:// or http://, if you find http can not redirect to https

, , ,