Config directive inheritance: docs and rules (was: Config variable inheritance)

Jonathan Matthews contact at jpluscplusm.com
Tue Apr 3 17:20:13 UTC 2012


Hi all -

http://www.ruby-forum.com/topic/188742 seems to contain some
information I've not found explicitly stated anywhere else: that
config directive inheritance is an all or nothing mechanism. Have I
missed some docs somewhere?

Following on from this, I'd like to understand if there's anything I
can reliably determine from a directive's name about the impact that
defining it will have on *other* directives' inheritability.

Can I, for instance, assume that defining an xyx_ prefixed directive in
a sub-scope will affect *only* the inheritance of other xyz_ prefixed
directives? Or can there be inheritance side-effects between, say,
directive "abc" and "def" that I can't possibly determine without
documentation or trial and error?

Equally, can I assume that *all* xyz_ prefixed directives will have
their inheritance affected by the sub-scope definition of any *other*
xyz_ prefixed directive? Or are there examples where defining
"xyz_foo" does *not* impact the inheritance of "xyz_bar"?

I'm thinking specifically of proxy_* directives, whereas the thread I
link to above is talking about multiple fastcgi_param directives.
Here, I'm interested in how, say, proxy_set_header affects the
inheritance of higher scope's proxy_pass directive - i.e. where the
prefix matches but they're *not* the same directive. Does nginx (core)
derive or imply anything relating to the name-spacing of directives
before (in my example) the proxy module sees the config, or is it
entirely down to how each module implements the configuration
aggregation/inheritance?

Many thanks,
Jonathan
-- 
Jonathan Matthews
London, Oxford, UK
http://www.jpluscplusm.com/contact.html



More information about the nginx mailing list