Proxy_pass via HTTP proxy

Hi,

I am trying to configure my nginx instance so that it "proxy_pass"es to
another HTTPS server S.
However, in order to reach S, I need to go though an HTTP server P. This
means nginx would need to connect to P, issue a CONNECT request, and
then
tunnel the HTTPS request to S.
Is this supported? How to enable it?
I could not find mention in the documentation, and it is kind of hard to
search for :slight_smile:

Thank you,
Ludovico

Posted at Nginx Forum:

just a try / not sure if it will work

  • when starting your nginx try to use a shellscript script that sets
    http_proxy / https_proxy:
    export http_proxy=http://server-ip:port/ ; i’m not sure it nginx has
    some
    options to use a 3rd proxy.

  • maybe you can use firewall-rules to do a simple portforwarding to your
    proxy P, but i’m not sure it will work (for intercepting http-traffic
    and
    using squid as a transparent proxy it works)

maybe https is an issue

regards,

mex

Posted at Nginx Forum:

On Wed, Jul 17, 2013 at 08:58:35PM -0400, cavedon wrote:

Hi there,

However, in order to reach S, I need to go though an HTTP server P. This
means nginx would need to connect to P, issue a CONNECT request, and then
tunnel the HTTPS request to S.
Is this supported?

No.

How to enable it?

Start coding :slight_smile:

Right now, nginx proxy_pass speaks http to a http server, or
http-over-ssl
to a https server. It doesn’t speak proxied-http to a http proxy
server. (Including the CONNECT method of proxied-http.)

So if you want that, you’ll need to look outside of current-nginx.

f

Francis D. [email protected]