Let me put what I want to achieve.
Before that I want to know what is this 'env' global directive for?
I want to maintain a single set of configuration files for dev and prod. The machines would have environment variable set ENV=dev or ENV=prod. Based on the values of the ENV varibale I wanted to pick my upstream conf, either upstream_dev.conf or upstream_prod.conf through 'include upstream_$ENV.conf'.
Please suggest an approach.
Before that I want to know what is this 'env' global directive for?
I want to maintain a single set of configuration files for dev and prod. The machines would have environment variable set ENV=dev or ENV=prod. Based on the values of the ENV varibale I wanted to pick my upstream conf, either upstream_dev.conf or upstream_prod.conf through 'include upstream_$ENV.conf'.
Please suggest an approach.