Ruby on Rails Sunday, January 2, 2011

On Jan 2, 2:32 am, "Mustafa C." <li...@ruby-forum.com> wrote:

>
> Below is my HTTPS server block at nginx:
>     server {
>         listen       443;
>         server_name  www.mysite.com;
>   proxy_set_header X_FORWARDED_PROTO https;

It looks like rails thinks your https post was an http one, and it's
probably because this proxy_set_header is getting ignored: the docs
for nginx say "proxy_set_header directives issued at higher levels are
only inherited when no proxy_set_header directives have been issued at
a given level". Try sticking this in the location block instead.

Fred

>         ssl                  on;
>         ssl_certificate      /srv/ssl/mysite.com.combined.crt;
>         ssl_certificate_key  /srv/ssl/mysite.com.key;
>         keepalive_timeout    70;
>      }
>
> I could not figure out if the problem is with NGINX - SSL setup or
> Rails-SSL_requirement issue. Any ideas? I have Rails 2.3.8,
> ssl_requirement plug-in and passenger 3.02 + nginx 0.8.53.
>
> Thanks in advance.
>
> --
> 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@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