<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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><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><div><span class="Apple-tab-span" style="white-space:pre">  </span>location /foo {</div><div><span class="Apple-tab-span" style="white-space:pre">                      </span>proxy_pass  <a href="http://127.0.0.1:6543">http://127.0.0.1:6543</a>;</div><div><span class="Apple-tab-span" style="white-space:pre">                    </span># nearly 10 lines of proxy_set_header </div><div><span class="Apple-tab-span" style="white-space:pre">                  </span>...</div><div><span class="Apple-tab-span" style="white-space:pre">                  </span>location /foo/admin {</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>proxy_pass  <a href="http://127.0.0.1:6543">http://127.0.0.1:6543</a>;</div><div><span class="Apple-tab-span" style="white-space:pre">                            </span>auth_basic "Administrator Login";</div><div><span class="Apple-tab-span" style="white-space:pre">                          </span>auth_basic_user_file /etc/nginx/_htpasswd/foo;</div><div><span class="Apple-tab-span" style="white-space:pre">                       </span>}</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>}</div></div><div><br></div><div><div>On Mar 23, 2016, at 7:20 AM, B.R. wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_default" 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 class="gmail_default" 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></body></html>