<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug 09, 2007, at 08:07 , Abhishek Singh wrote:</div><blockquote type="cite">I am using nginx for mongrel cluster , and i want to use nginx <br>proxy_next_upstream feature , so in which directive  should i place <br>this , like in http , server or location . <br><br> proxy_next_upstream error timeout http_500 http_503; <br><br>thanks</blockquote><br></div><div>Abhishek,</div><div><br class="webkit-block-placeholder"></div><div>I recommend placing it in the location block where you're proxying to your mongrels. That said it is legal in http, server, or location if you want it set once globally.</div><div><br class="webkit-block-placeholder"></div><div>For example:</div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; background-color: rgb(239, 236, 230); "><font face="Courier" size="4" style="font: 14.0px Courier">location / {</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; background-color: rgb(239, 236, 230); "><font class="Apple-style-span" face="Courier" size="4"><span class="Apple-style-span" style="font-size: 14px; line-height: normal; "><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-style-span" style="font-family: Helvetica; font-size: 16px; ">proxy_next_upstream error timeout http_500 http_503; </span></span></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; background-color: rgb(239, 236, 230); "><font face="Courier" size="4" style="font: 14.0px Courier">    proxy_pass        <a href="http://localhost:8000">http://localhost:8000</a>;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; background-color: rgb(239, 236, 230); "><font face="Courier" size="4" style="font: 14.0px Courier">    proxy_set_header  X-Real-IP  $remote_addr;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; background-color: rgb(239, 236, 230); "><span class="Apple-style-span" style="font-family: Courier; font-size: 14px; line-height: normal; ">}</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 17px; background-color: rgb(239, 236, 230); "><font class="Apple-style-span" face="Courier" size="4"><span class="Apple-style-span" style="font-size: 14px; line-height: normal;"><br class="webkit-block-placeholder"></span></font></div> </div><div><br class="webkit-block-placeholder"></div><div>Documentation here:</div><div><br class="webkit-block-placeholder"></div><div><a href="http://wiki.codemongers.com/NginxHttpProxyModule#proxy_next_upstream">http://wiki.codemongers.com/NginxHttpProxyModule#proxy_next_upstream</a></div><div><br class="webkit-block-placeholder"></div><div>Hope this helps,</div><div><br class="webkit-block-placeholder"></div><div>  ~ Wayne</div></body></html>