# Bug in HttpSslModule?

**URL:** <https://www.ruby-forum.com/t/bug-in-httpsslmodule/203733>\
**Category:** NGINX\
**Created:** [February 25, 2011, 10:56pm UTC](https://www.ruby-forum.com/t/bug-in-httpsslmodule/203733 "2011-02-25T22:56:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 25, 2011, 10:56pm UTC](https://www.ruby-forum.com/t/bug-in-httpsslmodule/203733/1 "2011-02-25T22:56:17Z")

</div>

Hi all,

I think I’ve found a bug in the HttpSslModule. We’re running Rails  
(Passenger) with Nginx and need to check if the current request is SSL.  
To do this, Rails needs “HTTPS: on” set in the environment.

In our nginx.conf, using the preferred syntax “listen 443 default ssl;”  
does not set this correctly. However, “listen 443; ssl on;” does. I  
haven’t found any other reports of this problem. Most examples of  
nginx+rails+ssl use the old syntax.

Thanks,  
Ian

---

<div class="post-metadata">

**Author:** ![Ian\_Young](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/e5b9ba/32.png) [@Ian\_Young](https://www.ruby-forum.com/u/Ian_Young)\
**Post date:** [February 25, 2011, 11:56pm UTC](https://www.ruby-forum.com/t/bug-in-httpsslmodule/203733/2 "2011-02-25T23:56:21Z")

</div>

Hello!

On Fri, Feb 25, 2011 at 01:54:39PM -0800, Ian Young wrote:

> I think I’ve found a bug in the HttpSslModule. We’re running Rails  
> (Passenger) with Nginx and need to check if the current request is  
> SSL. To do this, Rails needs “HTTPS: on” set in the environment.
> 
> In our nginx.conf, using the preferred syntax “listen 443 default  
> ssl;” does not set this correctly. However, “listen 443; ssl on;”  
> does. I haven’t found any other reports of this problem. Most  
> examples of nginx+rails+ssl use the old syntax.

Looks like passenger problem. You may want to report it passenger  
folks instead.

Maxim D.
