Last active
December 24, 2015 16:29
-
-
Save notmii/6828038 to your computer and use it in GitHub Desktop.
Generating a self signed SSL Certificate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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