×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: c4 xp
Added: May 16, 2016 12:22 PM
Views: 12
Easy way to install free certificates from Let's Encrypt (tested with ubuntu + nginx)
  1. echo -e " ---- ---- installing LetsEncrypt certificate ---- ---- \n"
  2. sudo apt-get install build-essential libssl-dev python-dev git
  3. locale
  4. sudo locale-gen en_US en_US.UTF-8
  5. sudo dpkg-reconfigure locales
  6. sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
  7. cd ~/
  8. git clone https://github.com/letsencrypt/letsencrypt
  9. cd letsencrypt
  10. sudo service nginx stop
  11. ./letsencrypt-auto certonly --standalone -d xyz.com -d www.xyz.com
  12. echo -e " ---- ---- insert into nginx server directive: ---- ---- \n"
  13. echo -e " ---- ---- ssl_certificate /etc/letsencrypt/live/xyz.com/fullchain.pem;  ---- ---- \n"
  14. echo -e " ---- ---- ssl_certificate_key /etc/letsencrypt/live/xyz.com/privkey.pem;  ---- ---- \n"
  15. sudo service nginx start