Welcome! Log In Create A New Profile

Advanced

Nginx C API: Traversing the configuration tree

Sam Vervaeck
August 14, 2018 08:42AM
Hi all,

I’m writing a small monitoring module and I need to perform some set-up after the configuration object has ben initialised. I use the postconfiguration-hook in ngx_http_module_t and would like this hook to traverse over all locations that have been enabled in my module in order to initialise some state and set up some (database) connections. Does anybody know how to traverse the locations when given the root ngx_conf_t? I’ve found ngx_http_location_tree_node_t but I’ve failed to decipher how exactly it works. Besides that, is this the right way to do so, or is there some clever location-specific postconfiguration-hook that I’m missing?

Many thanks,
Sam_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx C API: Traversing the configuration tree

Sam Vervaeck August 14, 2018 08:42AM

Re: Nginx C API: Traversing the configuration tree

Sam Vervaeck August 14, 2018 09:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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