6

im using nginx x as a reverse proxy. heres my configuration :

location /google/ {
    rewrite            ^/google/(.*) /$1 break;

    proxy_set_header   Host                 $host;
    proxy_set_header   X-Forwarded-For      $proxy_add_x_forwarded_for;     
    proxy_set_header   X-Real-IP            $remote_addr;

    proxy_pass         http://www.google.com;
}

The problem is that all my outbound HTTP request are going trough my compagny proxy, and nginx is giving me this error (seems that domain name resolution is made via the proxy)

nginx: [emerg] host not found in upstream "backend" in nginx.conf:xxx

How to configure nginx to use this proxy for outgoing request ?

kCorp
  • 61
  • 1
  • 3
  • Why was this question closed? Until now (2020-07-31), Nginx can't reach any "back ends" outside its own network, as far as I know. This is the only reason why, when I MUST use an HTTP connect proxy, I sometimes still use Apache with `ProxyPass` and especially `ProxyRemote`. – qräbnö Jul 31 '20 at 19:55

0 Answers0