variables in load time directives

Sean Allen sean at
Sat Aug 16 17:51:11 MSD 2008

such as access_log, include etc etc.

How hard is this to implement?
My life would be made infinitely easier if variables could be used  
anywhere so long
as they have already been defined like...

set $domain
listen $domain
listen *.$domain

include /sites/$domain/conf/ip-filtering

Right now our multiple site conf files have way to many things that  
need to be changed by hand
( or pushed out into a build system <-- the current method ). The  
problem that arises with our
current build system approach is that:

Many many files are identical except for just the install directory;  
these are best done as
a single shared location for all sites w/ variables in place.

This gets confusing with the build system where things are done at  
build time and some
when nginx is running; to keep things consistent, we'd need to do all  
the shared files
as svn externals ( i like to avoid externals. ). After much thought,  
having nginx handle it
all seems much easier from this end.

I think I saw something about the .7 series having this for some  
directives but not all
( I could be mistaken. ). So my questions would be:

Is this doable for all directives?
If yes, is it on the radar for the near future?
If not currently on the radar, would anyone be interesting in  
implementing for a bounty?

More information about the nginx mailing list