Francis Daly
September 01, 2021 06:20PM
On Wed, Sep 01, 2021 at 04:16:59PM -0400, temp pmet wrote:

Hi there,

> we now have requirements to forward the backend connection to the
> destination via a forward proxy. Is this possible? The flow looks like
> this:
> Client to -> NGINX reverse proxy server to -> backend server via forward
> proxy

When (stock) nginx is a client talking to a backend server, it can talk
http; it can't be configured to talk proxied-http. So if you need a proxy
server that only listens to proxied-http, you probably want something
other than nginx as the client.


if your proxy server can be configured as "transparent" -- which basically
means that it will listen to http and interpret what it probably would
have been if it had been proxied-http -- then you should be able to tell
nginx that the proxy server *is* the backend server, and maybe it will
work well enough in your use case.

If that is worth testing, you can use an "upstream" block with the name
of the backend server, containing a "server" directive with the ip:port
of the proxy. (Or have the system resolver resolve the backend name to
the proxy ip, if special ports are not needed.)

(If your backend is https not http, then things are different again.)

Good luck with it!

Francis Daly
nginx mailing list
Subject Author Posted

Re: Reverse Proxy - Backend via Forward Proxy

temp pmet September 01, 2021 04:18PM

Re: Reverse Proxy - Backend via Forward Proxy

Francis Daly September 01, 2021 06:20PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 65
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready