Welcome! Log In Create A New Profile

Advanced

Re: Define a proxy for Nginx

António P. P. Almeida
November 05, 2013 10:26AM
Assuming you're using php-fpm or php-cgi you can set a param to pass that
as a server variable:

fastcgi_param HTTP_PROXY 'http://proxy:myport';

Then you'll have a $_SERVER['HTTP_PROXY'] entry for the global $_SERVER.

HTH,

----appa



On Mon, Nov 4, 2013 at 3:09 PM, odesport <nginx-forum@nginx.us> wrote:

> I can't modify PHP code. I've managed to do this for Apache by adding the
> line
>
> export http_proxy="http://myproxy:port"
>
> in /etc/apache2/envvars
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,244407,244410#msg-244410
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Define a proxy for Nginx

odesport November 04, 2013 08:00AM

Re: Define a proxy for Nginx

Jonathan Matthews November 04, 2013 09:04AM

Re: Define a proxy for Nginx

odesport November 04, 2013 09:09AM

Re: Define a proxy for Nginx

Jonathan Matthews November 05, 2013 06:44AM

Re: Define a proxy for Nginx

António P. P. Almeida November 05, 2013 10:26AM

Re: Define a proxy for Nginx

odesport November 05, 2013 10:35AM

Re: Define a proxy for Nginx

António P. P. Almeida November 05, 2013 10:52AM

Re: Define a proxy for Nginx

Jonathan Matthews November 06, 2013 04:26AM

Re: Define a proxy for Nginx

António P. P. Almeida November 06, 2013 04:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 78
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready