-
-
Save DR-DinoMight/6da5f9e9c674ec33fd4dfdd5aa37df63 to your computer and use it in GitHub Desktop.
Rails 3.2.7 SSL Localhost (no red warnings, no apache config)
This file contains hidden or 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
# SSL self signed localhost for rails start to finish, no red warnings. | |
# 1) Create your private key (any password will do, we remove it below) | |
openssl genrsa -des3 -out localhost.orig.key 2048 | |
openssl rsa -in localhost.orig.key -out localhost.key | |
openssl req -new -key localhost.key -out localhost.csr | |
openssl x509 -req -days 365 -in localhost.csr -signkey localhost.key -out localhost.crt | |
thin start -p 3000 -e development | |
thin start -p 3001 --ssl --ssl-verify --ssl-key-file ~/.ssl/localhost.key --ssl-cert-file ~/.ssl/localhost.crt -e development | |
# 7) Add server.crt as trusted !!SYSTEM!! (not login) cert in the mac osx keychain | |
# Open keychain tool, drag .crt file to system, and trust everything. | |
# Notes: | |
# 1) Https traffic and http traffic can't be served from the same thin process. If you want | |
# both you need to start two instances on different ports. | |
# | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment