On 25 September 2012 12:03, Jon Ward <
jgh...@gmail.com> wrote:
> Hi all,
>
> I'm attempting to use exported resources to dynamically generate an nginx
> config file. What I'd like to do if have all my web servers export their
> hostname inside a file resource, and have these collected by my loadbalancer
> and used in the config file, restarting nginx if anything has changed.
Nginx can do include directives, right? Can you do something like:
<upstream>
include conf.d/upstream/*.conf
</upstream>
and then have each host export a file in
conf.d/upstream/$hostname.conf containing $hostname:$port (or whatever
is needed).
Not sure if that will work, my nginx is a little rusty...