How To Setup SSL + Thin + Facebook for Development

LINKS

How to create a self-signed certificate

COMMANDS

Make directories
`mkdir ~/.thin`
`mkdir ~/.thin/certs`
`cd ~/.thin/certs`

Generate certificate and key
`openssl genrsa -des3 -out server.key 1024`
`openssl req -new -key server.key -out server.csr`
`cp server.key server.key.org`
`openssl rsa -in server.key.org -out server.key`
`openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt`

UPDATE PROFILE ALIAS
`mate ~/.profile` or `mate ~/.bash_profile`

edit the alias you use to start your server to be something like the following…
alias serv_ssl=’thin start -p 4450 -e ce_dev -R config.ru —ssl —ssl-key-file ~/.thin/certs/server.key —ssl-cert-file ~/.thin/certs/server.crt’

In your terminal reload your profile: `source ~/.profile` or `source ~/.bash_profile`

Start your server…

Hit your domain (https://facebook.dontexist.com:PORT) in your browser.
‘Add Exception’ if FireFox; ‘Proceed’ if Chrome; anything else, you’re crazy.

Update your Facebook App config with the HTTPS URL.

YOU’RE DONE!!