Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable https in a rails app on a thin server

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

like image 926
banditKing Avatar asked Jul 21 '12 05:07

banditKing


People also ask

How do I run https on a Rails server?

To serve a Ruby on Rails application via HTTPS, there are three steps that you need to follow: Obtain an SSL certificate. Configure the web server to use the SSL certificate. Configure the Ruby on Rails application for HTTPS.

What is in a SSL certificate?

SSL certificates are what enable websites to move from HTTP to HTTPS, which is more secure. An SSL certificate is a data file hosted in a website's origin server. SSL certificates make SSL/TLS encryption possible, and they contain the website's public key and the website's identity, along with related information.


1 Answers

I don't know if you need it, but this helped me:

  thin start --ssl --ssl-verify --ssl-key-file ssllocal/server.key
--ssl-cert-file ssllocal/server.crt

edit path to ssl key and ssl fild. For example my keys were in paypal folder, so command was

    thin start --ssl --ssl-verify --ssl-key-file paypal/server.key
--ssl-cert-file paypal/server.crt

If you will have problems you can look at this post - Thin with SSL support and ruby-debug.

Hope this helps.

like image 117
deny7ko Avatar answered Oct 13 '22 19:10

deny7ko