Welcome! Log In Create A New Profile

Advanced

Dynamic module and obtaining http core module configuration

Rūdolfs Bundulis
August 10, 2016 05:12AM
Hi,

I am trying to make a dynamic nginx module. After reading all the tutorials
and stuff available I set up a working minimal sample and started hooking
up my http handlers. The question that arose is, in the static modules the
http module configuration is retrieved like this (in a lets say
postconfiguration handler):

static ngx_int_t postconfiguration_handler(ngx_conf_t* cf)
{
ngx_http_core_main_conf_t* nginx_http_configuration =
reinterpret_cast<ngx_http_core_main_conf_t*>(ngx_http_conf_get_module_main_conf(cf,
ngx_http_core_module));
...

If I'm not overlooking something this will not work (and in my case does
not) with a dynamic module
the ngx_http_core_module.ctx_index is not initialized since the initialized
version of ngx_http_core_module lives inside nginx.exe (where it is set by
ngx_count_modules) and my dll does not see that. If could run through the
module list and find what I need, but I just wanted to know if there is a
better solution already in place.

Best Regards,
Rudolfs Bundulis
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Dynamic module and obtaining http core module configuration

Rūdolfs Bundulis 445 August 10, 2016 05:12AM

Re: Dynamic module and obtaining http core module configuration

Maxim Dounin 206 August 17, 2016 07:46PM

Re: Dynamic module and obtaining http core module configuration

Rūdolfs Bundulis 206 August 23, 2016 07:26AM



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

Online Users

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