Hi, I have this setup:

the browser request (https on 443) is received by sshttp which sends it to
stunnel:1443 which proxy it to nginx:1080.
When nginx receives the request it has $scheme = "http"; so, for any rewrite
with "permanent" or "redirect" the Location header uses "http" while I
really need "https" scheme.

Is there any way for forcing nginx to change $scheme according to my will? 
or at least to generate the Location header with no scheme or with my
desired scheme?

Thank you

nginx configuration:
        server {
                listen proxy_protocol;
                port_in_redirect                off;
                server_name_in_redirect off;

stunnel configuration:
accept = ************:1443
connect =
protocol = proxy
sni = tls:tti.go.ro
[www on any]
sni = tls:*
connect =
protocol = proxy

Posted at Nginx Forum: 

nginx mailing list

Reply via email to