I have some ancient CGI app running on thttpd on a server what I would like to reverse proxy behind nginx.
From these examples it is the 3rd, the symmetric path: http://sawers.com/blog/reverse-proxying-with-nginx/
There is nothing else on that server, no vhosts it is accessible both by ip or domain for the outside I have configured a domain for it eg https://app.corporate.lan -> http://1.2.3.4/
With nginX I have tried it all nothing really works for my case
location / {
proxy_pass http://1.2.3.4/;
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header X-Forwarded-Proto https;
# proxy_set_header SSL_PROTOCOL $ssl_protocol;
# proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect http://$proxy_host/ $scheme://$host:$server_port/;
}
The http->http works fine so I assume that cgi crap doesn't like that the url turns into HTTPS, isn't there any way to fool this app thinking it's getting accessed through regular HTTP?
The code is really ancient I rather don't even touch it.