# SSL Reverse Proxy issues

**URL:** <https://www.ruby-forum.com/t/ssl-reverse-proxy-issues/235784>\
**Category:** NGINX\
**Created:** [July 15, 2013, 5:55pm UTC](https://www.ruby-forum.com/t/ssl-reverse-proxy-issues/235784 "2013-07-15T17:55:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [July 15, 2013, 5:55pm UTC](https://www.ruby-forum.com/t/ssl-reverse-proxy-issues/235784/1 "2013-07-15T17:55:08Z")

</div>

So I have a nginx.conf file that has multiple server blocks in it and  
they  
all are working except this one, and this one is half working so I  
assume  
I’m just missing one thing. Basically what happens is you can goto the  
server name that is set and the proxy pass works for that first site,  
but  
that site is also a login page that after authentication forwards the  
user  
to another page and what I’d like to make sure happens is that after  
authentication the ssl and server name still work as opposed to what’s  
happening now which is it breaks down completely.

server {  
chunkin on;

error\_page 411 = @my\_411\_error;  
location @my\_411\_error {  
chunkin\_resume;  
}

listen 8897 ssl;  
server\_name [myhttpaddress.com](http://myhttpaddress.com);

### SSL log files

access\_log /var/log/nginx/ssl-access.log;  
error\_log /var/log/nginx/ssl-error.log;

### SSL cert files

ssl\_certificate /etc/nginx/ssl/mycert.crt;  
ssl\_certificate\_key /etc/nginx/ssl/mycert.key;

### Add SSL specific settings here

keepalive\_timeout 60;

### Limiting Ciphers

# Uncomment as per your setup

# ssl\_ciphers HIGH:!ADH

# ssl\_perfer\_server\_ciphers on;

# ssl\_protocols SSLv3;

#####################################

# We want full access to SSL via backend

location /brim/ {  
more\_clear\_input\_headers ‘Transfer-Encoding’;  
proxy\_pass [http://myserver.com:8897/brim/](http://myserver.com:8897/brim/);

### force timeouts if one of backend is died

proxy\_next\_upstream error timeout invalid\_header http\_500 http\_502  
http\_503;

### Set headers

proxy\_set\_header Host $host;  
proxy\_set\_header X-Real-IP $remote\_addr;  
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for;

### Most PHP, Python, Rails, Java App can use this header

proxy\_set\_header X-Forwarded\_Proto https;

### By default we don’t want to redirect it

proxy\_redirect off;

}

}

Posted at Nginx Forum:

> **[SSL Reverse Proxy issues](https://forum.nginx.org/read.php?2,240878,240878#msg-240878)**
>
> So I have a nginx.conf file that has multiple server blocks in it and they all are working except this one, and this one is half working so I assume I'm just missing one thing. Basically what happens is you can goto the server name that is set and...

---

<div class="post-metadata">

**Author:** ![mosiac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/898d66/32.png) [@mosiac](https://www.ruby-forum.com/u/mosiac)\
**Post date:** [July 16, 2013, 8:02pm UTC](https://www.ruby-forum.com/t/ssl-reverse-proxy-issues/235784/2 "2013-07-16T20:02:00Z")

</div>

On Mon, Jul 15, 2013 at 11:54:24AM -0400, mosiac wrote:

Hi there,

> Basically what happens is you can goto the  
> server name that is set and the proxy pass works for that first site, but  
> that site is also a login page that after authentication forwards the user  
> to another page and what I’d like to make sure happens is that after  
> authentication the ssl and server name still work as opposed to what’s  
> happening now which is it breaks down completely.

What request do you make (ideally, using “curl -i”)?

What response do you get?

What response do you expect?

That information may make it more obvious where to look for the  
resolution  
to the problem.

## f

Francis D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
