Welcome! Log In Create A New Profile

Advanced

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

Maxim Dounin
June 10, 2014 10:54AM
Hello!

On Tue, Jun 10, 2014 at 02:09:13AM +0800, Rv Rv wrote:

> How do we access the configuration of a an unrelated module in a
> given module. This may be required for example to check if the
> directives pertaining to module 2 were specified in location for
> a particular server that has directives for module 1 in its
> configuration.

I don't think it's something you should do at postconfiguration -
location structure is complex and not easily accessible. There
are location configuration merge callbacks where you are expected
to work with location configs and, in particular, can use
ngx_http_conf_get_module_loc_conf() macro to access a
configuration of other modules (note though, that order of modules
may be important in this case).

[...]

> I did not find any documentation on how the configuration is stored within nginx using these structs 

It's under src/, in C language.

I would rather say it's not a part of the API, and you'd better
avoid using it directly.

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

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

Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

Rv Rv June 09, 2014 02:10PM

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

Maxim Dounin June 10, 2014 10:54AM

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

Rv Rv June 12, 2014 01:52AM

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

Maxim Dounin June 14, 2014 03:36PM

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

Rv Rv June 16, 2014 03:02AM

Re: Accessing the location configuration of module 2 during post configuration processing of module 1 for a particular server

Maxim Dounin June 16, 2014 10:16AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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