通过公司http\U代理传递NGINX代理

通过公司http\U代理传递NGINX代理,nginx,proxy,Nginx,Proxy,我正在尝试设置NGINX以代理从特定位置到internet的请求,但我需要通过公司代理。配置exmaple: location /test { proxy_http_version 1.1; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; pro

我正在尝试设置NGINX以代理从特定位置到internet的请求,但我需要通过公司代理。配置exmaple:

location /test {
    proxy_http_version 1.1;
    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_pass http://<service_accessible_through_the_internet>/test;
}
定位/测试{
proxy_http_版本1.1;
代理集头X-Real-IP$remote\u addr;
代理设置头主机$Host;
proxy\u set\u header X-Forwarded-For$proxy\u add\u X\u Forwarded\u For;
代理通行证http:///test;
}
问题是NGINX试图在不使用代理的情况下访问internet上的服务(与导出http_代理和使用curl相反),因此返回超时。 是否有可能将NGINX配置为如上所述工作? 谢谢
Lior

听着。谢谢Ivan,我已经读过这个解决方案,以前它对我不起作用,但现在我明白了原因。我试图将反向代理配置为HTTPS,这与本页中所述的不可能相同。