I have a reverse proxy with nginx + thin, and it works great. My problem is redirection to any controller when I''m under "https". It will redirect to "http". For example i''m on https://example.com then I use redirect "/view" and I''m redirected to http://example.com/view I''ve been searching but can''t find anything. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''ve solved this issue by using this configuration:
location / {
proxy_pass http://balancer;
proxy_redirect default;
proxy_redirect http:// https://;
}
that way Location http://.... changes to Location https://.... when the
port used is 443.
--
Posted via http://www.ruby-forum.com/.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
On 26 December 2010 01:31, Javier 12 <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I''ve solved this issue by using this configuration:Nice to know that you solved it, but being a Rails list, this is probably the wrong place to be asking. Check out: http://groups.google.com/group/sinatrarb Merry Christmas, -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Dec 26, 12:25 am, Javier 12 <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I have a reverse proxy with nginx + thin, and it works great. > > My problem is redirection to any controller when I''m under "https". It > will redirect to "http". >Sounds like sinatra doesn''t know it''s being connected to over https (since nginx handles all of that for you), whereas it needs to in order to be able to construct the correct URL You can do this with something like proxy_set_header X-FORWARDED_PROTO https; Fred> For example i''m onhttps://example.com > then I use > > redirect "/view" > > and I''m redirected tohttp://example.com/view > > I''ve been searching but can''t find anything. > > -- > Posted viahttp://www.ruby-forum.com/.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.