Welcome! Log In Create A New Profile

Advanced

Reverse proxying from HTTPs to HTTP (old app)

April 03, 2023 04:13PM
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.
Subject Author Posted

Reverse proxying from HTTPs to HTTP (old app)

quantumx April 03, 2023 04:13PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 261
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready