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

Maxim Dounin mdounin at
Wed Apr 4 13:58:46 UTC 2012


On Wed, Apr 04, 2012 at 01:40:40PM +0100, Francis Daly wrote:

> On Tue, Apr 03, 2012 at 06:20:13PM +0100, Jonathan Matthews wrote:
> Hi there,
> > 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?
> That refers to inheritance of a *single* directive.
> > 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.
> Yes: it will have no impact on other directives.
> > 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?
> No. It will affect no other xyz_ prefixed directives.

Not really, there are cases where it will.  Examples include (not 
sure if there are others):

1) allow and deny directives of access module create an array of 
allow/deny rules, and this array is inherited as a whole;

2) recently introduced xslt_param and xslt_string_param do the 
same thing with xslt parameters.

All such cases are more or less obvious though.


Maxim Dounin

More information about the nginx mailing list