NGINX option: test configuration, dump it expanded and exit

Francis Daly francis at
Mon Nov 22 21:17:37 UTC 2021

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?

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?

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.


Francis Daly        francis at

More information about the nginx mailing list