# There are two kinds of syntaxes # - \{\{key}}, key can be defined in configFile # - \{\{directive value}} {{user user}}; # `ngx` will resolve paths elegantly, so you can use relative paths here. # Furthermore, `ngx` will `mkdir -p ../config` prehead # to avoid the common "directory or file not found" error of nginx. {{pid ../config/nginx.pid}}; {{error_log ../logs/api-error.log}} warn; events { # You can define different `worker_connections` in configFile for # different environments. # See sample/preset/production.yml for details worker_connections {{worker_connections}}; } http { # The directive `include` now supports glob patterns, even two globstars # In the sample, it will also include './common/foo/header.conf' {{include ./common/**/*.conf}}; # `upstreams` and `servers` is a preserved data key of `ngx`, # see details in sample/preset/production.yml {{upstreams}} {{servers}} }