Is it possible to have a loop in config?

Casey Rayman casey.rayman at
Thu Jan 31 03:06:40 MSK 2008

I'm using nginx as a reverse proxy and so I've got several sites which  
use exactly the same config with the exception of the port.  Is there  
a way to do something like....

array {10,20,99}

for each i in array {
	server {
		listen $i;

Perhaps an odd question, but nginx has all kinds of useful features  
I'd never thought of before.


More information about the nginx mailing list