<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">I guess the docs logic is reversed: it is explicitely stated when a directive inherits, which must be that way because not considered the default behavior (although I am not in Igor's head...).<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">This product uses a different paradigm that 'minimal configuration lines', and Igor has nothing against duplicated blocks, which allow direct understanding of what is in effect in the location block you are looking at, compared to horizontal/similar ones (ofc server-wide directives shall not and won't be redeclared at location level).<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">In the modern world, use of configuration management tools, which allow templating, allows duplicated stanzas without trouble on configuration generation/deployment.<br><br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">That is a way of looking at configuration, and everyone has his/her views on it.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Please, correct me if I am wrong.<br></div><div class="gmail_extra"><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><div class="gmail_quote">On Thu, Mar 24, 2016 at 12:56 AM, Jonathan Vanasco <span dir="ltr"><<a href="mailto:nginx@2xlp.com" target="_blank">nginx@2xlp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span><br><div><div>On Mar 23, 2016, at 2:14 PM, Francis Daly wrote:</div><div><br></div><blockquote type="cite"><div>Any directives that inherit do not need to be repeated.<br><br>If it does not work for you, that's probably due to proxy_pass not<br>inheriting.<br></div></blockquote></div><br></span><div>Thanks - that's it -- `proxy_pass` does not inherit, but all the `proxy_set_header` directives in that block do.</div><div>Only the `proxy_pass` directive needed to be repeated in the location block (thank goodness!)</div><div><br></div><div><span><div><span style="white-space:pre-wrap">     </span>location /foo {</div><div><span style="white-space:pre-wrap">                  </span>proxy_pass  <a href="http://127.0.0.1:6543" target="_blank">http://127.0.0.1:6543</a>;</div></span><div><span style="white-space:pre-wrap">                     </span># nearly 10 lines of proxy_set_header </div><div><span style="white-space:pre-wrap">                  </span>...</div><div><span style="white-space:pre-wrap">                      </span>location /foo/admin {</div><div><span style="white-space:pre-wrap">                            </span>proxy_pass  <a href="http://127.0.0.1:6543" target="_blank">http://127.0.0.1:6543</a>;</div><div><span style="white-space:pre-wrap">                          </span>auth_basic "Administrator Login";</div><div><span style="white-space:pre-wrap">                              </span>auth_basic_user_file /etc/nginx/_htpasswd/foo;</div><div><span style="white-space:pre-wrap">                   </span>}</div><div><span style="white-space:pre-wrap">        </span>}</div></div><div><br></div><div><div>On Mar 23, 2016, at 7:20 AM, B.R. wrote:</div><br><blockquote type="cite"><div dir="ltr"><div style="font-size:small;color:rgb(51,51,153)">Why would you want to do that? Spaghetti configuration?<br></div></div></blockquote></div><div><div dir="ltr"><div style="font-size:small;color:rgb(51,51,153)"><br></div></div></div><div>The proxy has a dozen lines of configuration.  </div><div>The `proxy_pass` line doesn't inherit, but the docs don't mention that.</div><div>Only the `proxy_pass` directive not inheriting was the last thing I expected.  So I had to run duplicate blocks until things worked.</div><div><br></div><div><br></div></div><br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div></div>