A much easier option is to use labels and perl to swap comment items around
in the nginx.conf file.
#PLABEL
#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:
h
I have existing apache configuration which updates it's allow-deny rules
based on whether it's development or production system. For example, apache
gets started with '-D ${HOST_ENVIRONMENT}' parameter which is then used in
IFDefine block. I was wondering if Nginx has any options to use similar
op