Welcome! Log In Create A New Profile

Advanced

Re: Define a proxy for Nginx

Jonathan Matthews
November 04, 2013 09:04AM
On 4 November 2013 13:00, odesport <nginx-forum@nginx.us> 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.
>
> How can I define a proxy for nginx ?

I don't know the answer to that specific question, but I believe
you're asking the /wrong/ question :-)

Nginx doesn't execute your PHP, it just passes the requests to another
process. Your PHP apps will be executing in the context of this
different process (such as php-fpm) and it is /that/ process which you
need to inform about an outbound HTTP proxy. The specifics of how you
do that will depend on which process you've chosen to contain your
PHP, and the way in which your PHP makes outbound HTTP calls.

HTH,
Jonathan
--
Jonathan Matthews
Oxford, London, UK
http://www.jpluscplusm.com/contact.html

_______________________________________________
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: 297
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