NGINX option: test configuration, dump it expanded and exit

Fabiano Furtado Pessoa Coelho fusca14 at
Tue Nov 23 00:34:42 UTC 2021

Hi Francis,

On Mon, Nov 22, 2021 at 6:17 PM Francis Daly <francis at> wrote:
> On Mon, Nov 22, 2021 at 03:42:39PM -0300, Fabiano Furtado Pessoa Coelho wrote:
> Hi there,
> > NGINX has a -T option, where you can "test configuration, dump it and exit".
> > Is there a way to process the "include" directive and dump the
> > configuration "expanded"?
> I think that's what "-T" does, no?

Unfortunately, no.

> Look particularly for lines in the output that start with "# configuration file".
> Or do you mean: essentially remove the "include" line and insert the
> contents of the matching file(s), in place?

Exactly! Remove the "include" line and insert the contents of the
matching file(s) in place.

> I think that nginx does not do that directly.
> I think there is probably enough information in the "-T" output to allow
> you to stitch it together yourself, if it is important.
> I suspect that a good patch to add the facility to nginx directly would
> be thoughtfully considered, if you think that others might use that
> facility too.

Well, certainly I will use this! :)

> Cheers,


More information about the nginx mailing list