I know its not encouraged but I am trying to use Nginx (specifically
openresty/1.11.2.1 which is based on Nginx 1.11.2) as a forward proxy.

I did a quick setup based on all the examples I found in Google and tried
"GET http://www.google.com/"; as an example and found:

This does work:

  location / {
    resolver 127.0.0.1;
    proxy_pass $scheme://www.google.com$request_uri$is_args$args;
  }

This does not:

  location / {
    resolver 127.0.0.1;
    proxy_pass $scheme://$http_host$request_uri$is_args$args;
  }

In the latter example it seems that using the $http_host variable is
causing the problem - there is a hang for a few seconds then a 502 error is
delivered.

Is there any unofficial advice?

I also see this module:
https://github.com/chobits/ngx_http_proxy_connect_module

And I really don't want to change nginx core and am concerned it'll stop
being developed after being merged with tengine, but it looks like a
possible solution - anyone have success with it?
_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to