Enable https in a rails app on a thin server

banditKing picture banditKing · Jul 21, 2012 · Viewed 25.4k times · Source

I have a rails app running a thin server on heroku. It currently uses http. I would like to use https for bot development and production. Where do I begin to do this.

I have looked at this railscast where they show how to use a POW server. I dont want to use a POW server, I want to use a Thin server.

I also looked here: But here they assume that you have open ssl insatlled.

I haven't found any place which shows how to run https on a thin server from scratch.

I was wondering if anyone has any suggestions.

Thanks

Answer

Tanzeeb Khalili picture Tanzeeb Khalili · Jul 21, 2012

Try this:

$ thin start --ssl

You will need a separate instance if you want both ssl and non-ssl ports.