<div dir="ltr"><a href="http://wiki.nginx.org/HttpEchoModule#echo_exec">http://wiki.nginx.org/HttpEchoModule#echo_exec</a><br><div><br></div><div style>I use this model in some parts of my configs. I, however, use openresty and I'm not clear if there are any functionality differences between them. </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 14, 2014 at 5:58 PM, B.R. <span dir="ltr"><<a href="mailto:reallfqq-nginx@yahoo.fr" target="_blank">reallfqq-nginx@yahoo.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I am considering the following locations:<br>
<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">location / {<br>
</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"> proxy_pass <a href="http://upstream" target="_blank">http://upstream</a>;<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
}<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">location /documents/ {<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)"> try_files $uri @upstream;<br>
</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">}<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">location @upstream {<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
proxy_pass <a href="http://upstream" target="_blank">http://upstream</a>;<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">}<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
I would like to have a single named location to handle all fallbacks to upstream (to avoid duplication: maintenance will be easier!).<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">How does one redirect a prefix location directly to a named one?<br>
</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Using try_files might expose documents which are not supposed to be served outside of the /documents/ tree.<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">
Using rewrite? I learned here to avoid it as much as possible...<br clear="all"></div><div><font size="1"><span style="color:rgb(102,102,102)">---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div>
</div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>