Welcome! Log In Create A New Profile

Advanced

get a variable value in my module

January 20, 2011 04:44AM
Hello,

I have problem with getting the value of a variable from nginx conf file in my module - $arg_u.
Code in my module seems like:

{ ngx_string("ap_filter_sessionid"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_str_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ap_filter_loc_conf_t, sessionid),
NULL },

There is string "$arg_u" in the variable sessionid in ngx_http_ap_filter_loc_conf_t struct and not the read value of the variable. I went through some module codes and I found out that I should write my function instead of ngx_conf_set_str_slot directive. I tried to write it, but it has never worked. What should be in this function.

Thanks a lot in advance.

Michal
Subject Author Posted

get a variable value in my module

michalkraus January 20, 2011 04:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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