Forum: NGINX Nginx + SSL + Thin

Posted by sergiocampama (Guest)
on 2012-08-09 03:38
(Received via mailing list)
Hello,

I am trying to configure my web app to receive SSL support. I have nginx
with 2 server{} clauses, one for http and another (almost identical) for
https. I have a thin upstream server at port 3000, which only gets
redirected if a certain /subfolder is accessed.

I have the certificates in working order, I can access static content
perfectly. I also have a proxy_pass directive for http://rails_upstream.
I tried setting the https server to proxy_pass to https://rails_upstream
but it gave a 500 error.

Is there anything else I need to configure so that the same thin server
receives the https requests? Or do I need to configure another thin
server specifically for https purposes?

Best regards,

Posted at Nginx Forum: 
http://forum.nginx.org/read.php?2,229488,229488#msg-229488
Posted by Maxim Dounin (Guest)
on 2012-08-09 09:57
(Received via mailing list)
Hello!

On Wed, Aug 08, 2012 at 09:37:45PM -0400, sergiocampama wrote:

> but it gave a 500 error.
>
> Is there anything else I need to configure so that the same thin server
> receives the https requests? Or do I need to configure another thin
> server specifically for https purposes?

Unless you need https between nginx and thin for some reason, it's
usually enough to just write proxy_pass to http://rails_upstream.
Note "http", not "https".

If you want https between nginx and thin, you have to run another
thin instance to handle https.

Maxim Dounin
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.