ifdefine alternative

itpp2012 nginx-forum at nginx.us
Tue Feb 17 21:45:16 UTC 2015

A much easier option is to use labels and perl to swap comment items around
in the nginx.conf file.

#development line....;
production line....;

if readln eq '^#PLABEL' then { swap 2 lines comment char; } else { write
unchangedline; }

Or something in that order.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,256733,256734#msg-256734

More information about the nginx mailing list