Re: Define a proxy for Nginx

2013-11-06 Thread António P . P . Almeida
As for the first point, of course that variable needs to be used on the application side. The OP suggested that is cased since he described basically that with the Apache env var directive. As for the second, I was not considering security issues, but: 1. You need to be able to edit the php-fpm

Re: Define a proxy for Nginx

2013-11-06 Thread Jonathan Matthews
On 5 November 2013 15:25, António P. P. Almeida wrote: > 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. I don't think

Re: Define a proxy for Nginx

2013-11-05 Thread António P . P . Almeida
No you don't. It's a server config. It will set the same global as the Apache env thing AFAIK. appa On Tue, Nov 5, 2013 at 4:35 PM, odesport wrote: > Thanks, but with fastcgi_param I have to modify PHP code. > > Posted at Nginx Forum: > http://forum.nginx.org/read.php?2,244407,244462#msg-

Re: Define a proxy for Nginx

2013-11-05 Thread odesport
Thanks, but with fastcgi_param I have to modify PHP code. Posted at Nginx Forum: http://forum.nginx.org/read.php?2,244407,244462#msg-244462 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: Define a proxy for Nginx

2013-11-05 Thread António P . P . Almeida
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 wrote: > I can't m

Re: Define a proxy for Nginx

2013-11-05 Thread Jonathan Matthews
On 4 November 2013 14:09, odesport 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 Glad to hear you've solved your problem :-) J ___ ngi

Re: Define a proxy for Nginx

2013-11-04 Thread odesport
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

Re: Define a proxy for Nginx

2013-11-04 Thread Jonathan Matthews
On 4 November 2013 13:00, odesport wrote: > Hello, > > My Nginx servers are behind a proxy. Some PHP apps need to reach external > web sites (for RSS feeds for example). I've tried this in nginx.conf : > > env http_proxy=http://myproxy:port > > but there is no effect.

Define a proxy for Nginx

2013-11-04 Thread odesport
Hello, My Nginx servers are behind a proxy. Some PHP apps need to reach external web sites (for RSS feeds for example). I've tried this in nginx.conf : env http_proxy=http://myproxy:port but there is no effect. How can I define a proxy for nginx ? Posted at Nginx Forum: