post_action to a backend server

Paul Bowsher paul.bowsher at gmail.com
Sun Jan 25 15:21:42 MSK 2009


Perfect, thank you very much Maxim!
Paul Bowsher


On Sun, Jan 25, 2009 at 12:01 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Sat, Jan 24, 2009 at 07:19:10PM +0000, Paul Bowsher wrote:
>
> > Hi,
> > I am currently using nginx on frontend to proxy all requests to an apache
> > backend. I want to use post_action to callback upon completion of a
> request.
> >
> > The location I want to callback to is on the backend. Currently I have
> the
> > following:
> >
> >         location / {
> >             proxy_pass http://test;
> >             post_action /test_post.php;
> >         }
> >
> >         location = /test_post.php {
> >             proxy_pass http://test;
>
> -             proxy_pass http://test;
> +             proxy_pass http://test/test_post.php;
>
> >             internal;
> >         }
> >
> > Normal proxying works fine, but nginx does not appear to ever make the
> > callback to test_post.php. Removing the test_post.php location results in
> a
> > Redirect cycle error in my log. Does anyone know how to resolve this?
>
> See above.  The proxy_pass without uri component uses original
> request uri (and post_action doesn't invalidate it currently).  So
> you have to use proxy_pass with explicitly set uri for this to
> work.
>
> Maxim Dounin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20090125/a4143261/attachment.html>


More information about the nginx mailing list