# Nginx + SSL + Thin

**URL:** <https://www.ruby-forum.com/t/nginx-ssl-thin/222012>\
**Category:** NGINX\
**Created:** [August 9, 2012, 3:38am UTC](https://www.ruby-forum.com/t/nginx-ssl-thin/222012 "2012-08-09T03:38:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [August 9, 2012, 3:38am UTC](https://www.ruby-forum.com/t/nginx-ssl-thin/222012/1 "2012-08-09T03:38:11Z")

</div>

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:

> **[Nginx + SSL + Thin](https://forum.nginx.org/read.php?2,229488,229488#msg-229488)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![sergiocampama](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/cab0a1/32.png) [@sergiocampama](https://www.ruby-forum.com/u/sergiocampama)\
**Post date:** [August 9, 2012, 9:57am UTC](https://www.ruby-forum.com/t/nginx-ssl-thin/222012/2 "2012-08-09T09:57:20Z")

</div>

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 D.
