Giving external arguments to nginx.conf (and using if statements) -


how can make system-specific variations in nginx.conf file, can use same file on both - development machine , on live server?

nginx.conf pseudo example:

if system == mac   user _www; else # ubuntu   user www-data; end 
  1. can set environment variables in bash nginx.conf can read? if so, syntax reading these?
  2. can use nginx -g option give nginx arguments? if so, command line syntax this, , syntax reading arguments inside nginx.conf?

sorry asking, manual sort of vague on these topics.

nginx.conf seems defy idea of if's , variables, ended writing small script converts dev.conf live.conf part of deployment. differences minuscule, necessary.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -