Enable HTTPS on localhost with NGINX
# Enable HTTPS on localhost with NGINX From: [digitalocean](https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-16-04) # 1. Create a self-signed key and certificate pair ```bash sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.cer # Note: digitalocean use extension .crt not .cer. ``` *[req](# 'We want to use X.509 certificate signing request (CSR) management.'). [X.509](# 'Is a public key infrastructure standard. It specifies that we want to make a self-signed certificate instead of generating a certificate signing request'). [nodes](# 'Stop encrypting certificate with a passphrase. We need Nginx to be able to read the file, without user intervention'). [days](# 'Valid days before expire.'). [newkey](# 'Generate a new certificate and a new key at the same time.'). [rsa:2048](# 'To m...