Sunday, April 03, 2016

How HTTPS enabled on www.ramshanker.in

Open Terminal
~$cd Desktop
~/Desktop$git clone https://github.com/letsencrypt/letsencrypt
~/Desktop$ cd letsencrypt/
~/Desktop/letsencrypt$ sudo ./letsencrypt-auto --help
~/Desktop/letsencrypt$ sudo ./letsencrypt-auto -a manual certonly -d ramshanker.in -d www.ramshanker.in

Accept the TOS
Accept logging of IP address.

It prompts to create "http://ramshanker.in/.well-known/acme-challenge/uiVIjSLQ-_p_ajYYQUwvVebM7geXXUcrlWoVtEsA4-s" to serve " uiVIjSLQ-_p_ajYYQUwvVebM7geXXUcrlWoVtEsA4-s.EFr0e5JktDDzby1KURbGvZxi1RN_is6CAALDUcZ1zxg " then press enter

It prompts to create "http://www.ramshanker.in/.well-known/acme-challenge/vzPLIAjGJ4jPO1TABldy5dm4lQKqKWBd9X0e3qhoJXg" to serve "vzPLIAjGJ4jPO1TABldy5dm4lQKqKWBd9X0e3qhoJXg.EFr0e5JktDDzby1KURbGvZxi1RN_is6CAALDUcZ1zxg " then press enter

Then following message is displayed.
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at /etc/letsencrypt/live/ramshanker.in/fullchain.pem. Your cert will expire on 2016-07-02. To obtain a new version of the certificate in the future, simply run Let's Encrypt again.

- If you like Let's Encrypt, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le

Now convert the certs generated to the format acceptable by google app engine.
~/Desktop$ sudo openssl rsa -inform pem -in /etc/letsencrypt/live/ramshanker.in/privkey.pem -outform pem | less > formated_privkey.pem
~/Desktop$ sudo less /etc/letsencrypt/live/ramshanker.in/fullchain.pem > formated_fullchain.pem

There was also a message in between to backup the private key from /etc/letsencrypt.
Now upload the fullchain.pem (pubic key) and private key to google app engine console settings.
Done. As simple as it could get.