Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How to install Let’s Encrypt on AWS (EC2) ?

How to install Let’s Encrypt on AWS (EC2) ?

How to install Let’s Encrypt on AMIMOTO ?
AMIMOTO (HHVM) + SSL(Let's Encrypt)

More Decks by Amimoto - Flexible Cloud WordPress Hosting

Other Decks in How-to & DIY

Transcript

  1. Length of time the 
 certificate is good Company Details

    of the authority 
 who issued the Company Information a security SSL certificates contains
  2. Install WordPress 1. Log into the root of your server

    using SSH:
 
 $ ssh -i /Users/macpil/Desktop/example.pem ec2-user@instance_ip or domain
 2. Update all packges:
 
 $ sudo yum update
 3. Install WordPress:
 
 $ sudo /usr/local/bin/wp-setup example.com
  3. Install pip and Let’s encrypt 1. Install Python:
 
 $

    sudo yum install python27-pip python27-virtualenv augeas-libs dialog gcc libffi-devel openssl-devel system-rpm-config
 2. Install Let’s encrypt:
 
 $ sudo virtualenv /opt/letsencrypt/
 $ sudo /opt/letsencrypt/bin/pip install letsencrypt
 3. Create a certificate
 
 $ sudo /opt/letsencrypt/bin/letsencrypt certonly -t -d example.com - a webroot --webroot-path=/var/www/vhosts/example.com/ --rsa-key-size 2048 --server https://acme-v01.api.letsencrypt.org/directory
 4. Enter email address used for urgent notices and lost key recovery
  4. Install pip and Let’s encrypt 1. Change nginx settings for:


    
 $ sudo cp /etc/nginx/conf.d/default-ssl.conf /etc/nginx/conf.d/ example.com-ssl.conf
 
 2. Edit gomp.pl-ssl.conf:
 
 $ sudo vi /etc/nginx/conf.d/example.com-ssl.conf

  5. gomp.pl-ssl.conf server { listen 443 ssl http2; server_name example.com; root

    /var/www/vhosts/example.com; index index.html index.htm; charset utf-8; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_ciphers AESGCM:HIGH:!aNULL:!MD5; ssl_session_cache shared:SSL:10m; ssl_session_timeout 5m; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; access_log /var/log/nginx/example.com.access.log main; error_log /var/log/nginx/example.com.error.log;
  6. Install pip and Let’s encrypt 3. Change nginx settings for:


    
 $ sudo cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/ example.conf
 
 4. Edit gomp.pl.conf:
 
 $ sudo vi /etc/nginx/conf.d/example.com.conf

  7. gomp.pl.conf server { listen 80; server_name example.com; root /var/www/vhosts/example.com; index

    index.html index.htm; charset utf-8; access_log /var/log/nginx/example.com.access.log main; error_log /var/log/nginx/example.com.error.log;