Skip to main content

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
 

Comments

Popular posts from this blog

Making money with the falling rand: Lessons from Zimbabwe

It is no secret that the rand is falling like there is no tomorrow. This year alone it has fallen by over 18%. And if you look closely, at the last 3 years- it has fallen by 35%! This is not neglecting the economic setup where the slightest thing leads to ‘ toi toi. ' This trend of continuous striking and pay rate increase bargains has created such a vicious cycle. Prices rise, people strike, economy starts going through stuff. And we back at square one. We all know for sure that this cycle is bad. Zimbabwe and South Africa might not be different soon, only difference being that Zimbabwe chased the farmers, South Africa is chasing stabilisation. (Maybe the paradox of thrift  (prompted by the large population) will save them! Hope so.) In Zimbabwe 2008, a lot of people made a lot of money from ‘burning money’. This was whereby people took advantage of the bank rate versus the ‘streets’ rate of forex. The streets rate for forex was lower than the bank rate. Problem wa...

Artificial Neural Networks - Intro for beginners

The perceptron Single node perceptron Perceptrons form the basis for ANNs. Perceptron takes input and produces output as below: Input ➡️ Activation Function ➡️ Output Input If the weight is 0- input remains unaltered coming into the perceptron. Below is what happens to the input ∑ w i z i  ≽ t then y = 1. Else y = 0.  i t is the threshold which is set by the outgoing part. So the key to output is based on the weighted sum and the threshold. Activation function This is the processing part of the neuron and this determines output. So most commonly the ones used are the Sigmoid function and the hyperbolic tangent. QUESTION: Which activation function should I use? I am going to talk of three key activation functions a) Sigmoid The Sigmoid returns 0 or 1 and in code can be written as return 1.0/(1.0+Math.exp(-x) A Sigmoid is a mathematical curve having the characteristic S shape. DISADVANTAGE: Descending Gradient b) Tanh DISAD...

AI Simplified 2 : Bellman and Markov

Bellman equation  It's named after Richard Bellman and is defined as a necessary condition for optimality. It is associated with the mathematical optimization method known as dynamic programming. The deterministic equation is listed below:  V(s) = maxₐ  (R(s,a) + ɣ(V(s')) maxₐ : represents all the possible actions that we can take. R(s, a): The reward of taking an action at a particular state. ɣ: Discount. Works like the time value of money. You can see the dynamic programming aspect as we call the same method on s'. So it will recursively operate to solve the problem. Deterministic vs non-deterministic : Deterministic is definite, there is no randomness whereas non-deterministic is stochastic. So above we were not adding any randomness (deterministic) but nothing in this world is truly predictable, let's add randomness. Whereby each step is not so certain to be done (adding probability). It makes our agent more natural (being drunk! lol)...