SSL Reverse Proxy issues

mosiac nginx-forum at nginx.us
Mon Jul 15 15:54:24 UTC 2013


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;

### 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/;
### 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: http://forum.nginx.org/read.php?2,240878,240878#msg-240878



More information about the nginx mailing list