Skip to content

Instantly share code, notes, and snippets.

@lattespirit
Created December 14, 2018 15:54
Show Gist options
  • Save lattespirit/731aae8cb57eb8d0bec30940a83bbe4e to your computer and use it in GitHub Desktop.
Save lattespirit/731aae8cb57eb8d0bec30940a83bbe4e to your computer and use it in GitHub Desktop.
Create Self Signed SSL Certificates
sudo openssl genrsa -out "/etc/ssl/your-domain-name.key" 2048
# Generate a CSR using the private key for encryption
sudo openssl req -new -key "/etc/ssl/your-domain-name.key" -out "/etc/ssl/your-domain-name.csr"
sudo openssl x509 -req -days 365 \
-in "/etc/ssl/your-domain-name.csr" \
-signkey "/etc/ssl/your-domain-name.key" \
-out "/etc/ssl/your-domain-name.crt"
ssl_certificate /etc/ssl/your-domain-name.crt;
ssl_certificate_key /etc/ssl/your-domain-name.key;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment