Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to make nginx respect http_proxy and https_proxy

$
0
0
Hello ,

I am using nginx as a reverse proxy server ,

I am running it on an internal organization which users proxy to go to the internet .

Explain :

When I am connecting from my linux box to google , I am going throw a proxy server

In order to authenticate with the proxy I need to define two environment variables

export http_proxys=http://proxy.org.com:443

and then every command that goes out from the machine , go throw the proxy .

now , I am going back to the nginx ,

I configured a stanze :

server {
listen 443 ssl;
keepalive_timeout 70;
fastcgi_param https_proxy http://kuku.blabla.com:443;
ssl_certificate ops.blabla.com.crt;
ssl_certificate_key ops.blabla.com.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;

location / {
proxy_pass https://mona.blabla.com ;
}

}

as you can see when I am sending a requests to the nginx , it proxy_pass me to https://mona.blabla.com ,

but , its not working since it looks like the nginx is not respecting the proxy configuration .

How can I make it happen ?

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>