Welcome! Log In Create A New Profile

Advanced

Re: Perl interaction with HTTP Proxy:

Engin Akyol
February 09, 2012 03:42AM
Awesome! Thank you. Going to experiment for a few more hours with this.

/Engin

On Thu, Feb 9, 2012 at 2:37 AM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> Hello!
>
> On Thu, Feb 09, 2012 at 02:30:36AM -0600, Engin Akyol wrote:
>
>> Hey guys, I'm trying to write a couple of perl modules for my nginx
>> server that is acting as an HTTP Proxy.
>>
>> What I'd like to do is use Perl to perform some (quick) checks and
>> then return an error code, but I'm noticing that if I execute any perl
>> code before the config block that engages the http_proxy, the perl
>> error code is ignored.  If I execute the perl block after the
>> http_proxy, then the connection isn't proxy passed at all.  Is this a
>> config issue on my part or is this normal behavior with regards to
>> perl.  If it's normal behavior, how can I use perl modules to perform
>> checks with http_proxy features enabled?
>
> Both perl and proxy set exclusive location handlers, and they
> can't be used together in the same location.
>
> If you need to check requests with perl and then proxy_pass
> somewhere, you have to use $r->internal_redirect(uri) in perl to
> pass processing to another location with proxy_pass configured.
>
> Maxim Dounin
>
> _______________________________________________
> 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

Perl interaction with HTTP Proxy:

Engin Akyol February 09, 2012 03:32AM

Re: Perl interaction with HTTP Proxy:

Maxim Dounin February 09, 2012 03:38AM

Re: Perl interaction with HTTP Proxy:

Engin Akyol February 09, 2012 03:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 175
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