Skip to content

Instantly share code, notes, and snippets.

@notmii
Last active December 24, 2015 16:29
Show Gist options
  • Save notmii/6828038 to your computer and use it in GitHub Desktop.
Save notmii/6828038 to your computer and use it in GitHub Desktop.
Generating a self signed SSL Certificate
#!/bin/bash
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
# nginx example
#
# server {
# server_name YOUR_DOMAINNAME_HERE;
# listen 443 ssl;
# ssl on;
# ssl_certificate /usr/local/nginx/conf/server.crt;
# ssl_certificate_key /usr/local/nginx/conf/server.key;
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment