Welcome! Log In Create A New Profile

Advanced

How to make nginx respect http_proxy and https_proxy

Posted by shyperetz 
How to make nginx respect http_proxy and https_proxy
July 07, 2014 05:58PM
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 ?
Re: How to make nginx respect http_proxy and https_proxy
October 17, 2017 11:28PM
Any luck on this?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 218
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready