set variables within config

Cliff Wells cliff at develix.com
Fri May 15 01:01:12 MSD 2009


On Thu, 2009-05-14 at 13:39 -0700, Michael Shadle wrote:
> On Thu, May 14, 2009 at 12:32 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> 
> > As of now nginx has no variables expanded during config loading -
> > everything expaneded during request processing.  So using
> > variables just to save some config lines is somewhat stupid as it
> > means wasting lots of CPU time for every request.
> >
> > If you really need to simplify configs - it's easy to generate
> > them using make and sed.
> 
> This might be what Igor meant by "configuration macros"?

If you wanted, you could probably even leverage some template engine
(typically used for HTML generation, but often useful standalone) to
generate configs.

Cliff






More information about the nginx mailing list