Skip to content

Instantly share code, notes, and snippets.

@binhqd
Created November 1, 2017 07:23
Show Gist options
  • Save binhqd/03d4473ca2d5f164ed57586db6dff9d8 to your computer and use it in GitHub Desktop.
Save binhqd/03d4473ca2d5f164ed57586db6dff9d8 to your computer and use it in GitHub Desktop.
Install Certbot and SSL
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install -y python-certbot-nginx
# centos
yum -y install yum-utils letsencrypt
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
yum install -y certbot-nginx
certbot --nginx
certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment