Updated for Ubuntu 18.04 / 16.04
SSH into the server running your HTTP website as a user with sudo privileges.
You'll need to add the Certbot PPA to your list of repositories. To do so, run the following commands on the command line on the machine:
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo su - root # This has to be run as root.
cd /usr/sbin
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
./certbot-auto
Add the following to your nginx server configuration block vim sites-enabled/yourdomain.com
location ^~ /.well-known/ {
root /usr/share/nginx/html;
}
Add folder for well known mkdir -p /usr/share/nginx/html
Create `mkdir -p /etc/...