Welcome! Log In Create A New Profile

Advanced

resolver directive takes only hardcoded IP?

Posted by karenc123 
resolver directive takes only hardcoded IP?
April 06, 2016 12:56PM
I'd like my conf file to handle a configurable resolver. I attempted to do this with an environment variable passed in at runtime via -e, then using set_by_lua to retrieve the value and eventually use in the resolver directive. I am using other environment variables for other purposes so I am confident I have the right syntax for defining and retrieving the variables.

I can hardcode an IP with the resolver directive and it works ok.

But when I try something like
resolver $resolver_value;
I get an error saying "host not found in resolver $resolver_value"

Am I trying to do something that's an unsupported use case?
Re: resolver directive takes only hardcoded IP?
April 06, 2016 01:12PM
This question is better placed here:
https://groups.google.com/forum/#!forum/openresty-en

---
nginx for Windows http://nginx-win.ecsds.eu/
Re: resolver directive takes only hardcoded IP?
April 08, 2016 10:43AM
Thank you! Have posted to openresty-en at https://groups.google.com/forum/#!topic/openresty-en/wU0wAvoSklM
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 237
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready