Thanks Oscar. Yes I'd read that first page and a bunch of those search results before. I guess I'll end up writing custom config files per environment, too, and maybe a script to regenerate and send a HUP to nginx when the data changes. I really wanted to avoid this because it's just one more moving part that I'd rather not have.
It seems pretty reasonable to want to do this sort of thing just once at startup. Even getting an env variable for every HTTP request seems kind of an overhead, however tiny. Maybe I'll look at writing a module to do it some day. When I have enough time to learn how to write network-accessing ngx_* modules without breaking everything ;-)
Anyway, if anyone knows of another way to do it, that'd be great, but in the meantime I appreciate your response. Thanks.
Best,
Igor