Perfect, thank you very much Maxim!<div><br clear="all">Paul Bowsher<br>
<br><br><div class="gmail_quote">On Sun, Jan 25, 2009 at 12:01 PM, Maxim Dounin <span dir="ltr">&lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello!<br>
<div class="Ih2E3d"><br>
On Sat, Jan 24, 2009 at 07:19:10PM +0000, Paul Bowsher wrote:<br>
<br>
&gt; Hi,<br>
&gt; I am currently using nginx on frontend to proxy all requests to an apache<br>
&gt; backend. I want to use post_action to callback upon completion of a request.<br>
&gt;<br>
&gt; The location I want to callback to is on the backend. Currently I have the<br>
&gt; following:<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; location / {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_pass <a href="http://test" target="_blank">http://test</a>;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; post_action /test_post.php;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; location = /test_post.php {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_pass <a href="http://test" target="_blank">http://test</a>;<br>
<br>
</div>- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_pass <a href="http://test" target="_blank">http://test</a>;<br>
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_pass <a href="http://test/test_post.php" target="_blank">http://test/test_post.php</a>;<br>
<div class="Ih2E3d"><br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; internal;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br>
&gt;<br>
&gt; Normal proxying works fine, but nginx does not appear to ever make the<br>
&gt; callback to test_post.php. Removing the test_post.php location results in a<br>
&gt; Redirect cycle error in my log. Does anyone know how to resolve this?<br>
<br>
</div>See above. &nbsp;The proxy_pass without uri component uses original<br>
request uri (and post_action doesn&#39;t invalidate it currently). &nbsp;So<br>
you have to use proxy_pass with explicitly set uri for this to<br>
work.<br>
<font color="#888888"><br>
Maxim Dounin<br>
<br>
</font></blockquote></div><br></div>