On Wed, Nov 11, 2009 at 6:44 PM, SaveTheRbtz <[email protected]> wrote:
>
> I've just installed Gitorious on our development server on SLES11
> using nginx-passenger
>
> When i'm clicking login Firefox says: "The page isn't redirecting
> properly. Firefox has detected that the server is redirecting the
> request for this address in a way that will never complete."
>
Hi,
I would suggest this has to do with the SSL requirement on
SessionsController#new (which is mapped to /login). Since Nginx basically
just proxies to a backend Rails process, the Rails process needs to know the
page was requested (to Nginx) using SSL. Otherwise the Rails process assumes
it's served over plain HTTP and will redirect to the same URL over https.
Rails (and thereby Gitorious) has several ways of determining whether a
request was made over SSL or not, one of which is to inspect the environment
variable HTTP_X_FORWARDED_PROTO. So what we want is to have Nginx set this
environment variable to "https" when a request is made over SSL.
I'm no Nginx expert, but I believe the line
proxy_set_header X_FORWARDED_PROTO https;
will add this header for you. You should make sure this header is only set
when a request is in fact made over SSL. I don't know if you need to
server{} blocks in your Nginx config to achieve this or if there's a
conditional that does it, your Nginx skills are probably a lot better than
mine.
HTH,
Marius
--
Marius Mårnes Mathiesen
Rubyist, Shortcut AS
Tel.: (+47) 92 60 95 38.
http://shortcut.no
--
You received this message because you are subscribed to the Google Groups
"Gitorious" group.
To post to this group, send email to [email protected].
For more options, visit this group at
http://groups.google.com/group/gitorious?hl=.