Ruby on Rails Wednesday, April 4, 2012

On Wed, Apr 4, 2012 at 9:46 AM, Pedr Browne <lists@ruby-forum.com> wrote:

> I am building an application that consists of two areas; a website and
> an API. I would like the website to use HTTP and the API to use HTTPS.
> How can I set this up for my Development Environment?
>
> I am using Thin, which I can start using the --SSL flag. However this
> means any HTTP urls will fail. As far as I can see it is impossible to
> have a server handle both HTTP and HTTPS, so how do people develop an
> application that uses SSL locally?

Why not just do what you would do in production: put an SSL-capable
proxy (apache httpd, nginx, squid, etc.) in front of thin?

Alternatively, start 2 instances of thin on appropriate ports.

HTH,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment