Skip to main content

Posts

Showing posts from December, 2018

Adding HTTPS for free with letsencrypt - Domain & Subdomain

Well why not httpsforfree? Well frankly the fact that they have access to my private keys freaks me out and letsencypt can have you up and running in seconds. Here are the steps 1. SSH into your VPS 2. Add the repo(if its not added already) add-apt-repository ppa:certbot/certbot 3. Install certbot $ apt-get update $ apt-get install python-certbot-nginx   4. Obtain certificate     $ sudo certbot --nginx -d example.com -d www.example.com     Follow the prompts and make sure you put your proper email!   (Optional) Setup a cron job to auto renew. I find the nano option easier and below I will show you my config.   $ crontab -e   Then 0 12 * * * /usr/bin/certbot renew --quiet     For subdomain i use   $ sudo certbot --nginx -d example.com -d  subdomain.example.com