Welcome! Log In Create A New Profile

Advanced

Re: ngx resolver set custom name server

Maxim Dounin
June 30, 2014 08:12PM
Hello!

On Mon, Jun 30, 2014 at 03:43:56PM +0300, Donatas Abraitis wrote:

> Hello,
>
> is it possible to set resolver (
> http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver) writing
> own nginx module?
>
> I want to set custom name servers for querying by gethostbyaddr(). By
> default gethostbyaddr() uses /etc/resolv.conf, /etc/hosts. I want to
> override this by setting somehow.
>
> Anyone?

Sorry, but I doubt anyone was able to understand your question.
At least I wasn't. You may try to clarify what you want to do and
what is your question.

Just in case, parameters of the "resolver" directive specify DNS
servers to use, and it's completely unrelated to system
gethostbyaddr(), resolv.conf and /etc/hosts. For an example of
how to use resolver from an nginx module take a look at
ngx_http_upstream.c and/or ngx_mail_smtp_handler.c.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

ngx resolver set custom name server

Donatas Abraitis 759 June 30, 2014 08:46AM

Re: ngx resolver set custom name server

Maxim Dounin 408 June 30, 2014 08:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 191
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