Define a proxy for Nginx

António P. P. Almeida appa at perusio.net
Tue Nov 5 15:25:10 UTC 2013


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 at 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 at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20131105/3a8bd988/attachment.html>


More information about the nginx mailing list