Welcome! Log In Create A New Profile

Advanced

add variable in module, change value in config

October 26, 2011 11:36AM
I want to control behaviour of my module at runtime(body filtering phase), depending on different data (reg exp in headers, value of different variables...), so I decided to add variable in my module, and then set value in nginx config with "set" operation in rewrite module.
I am adding variable via ngx_http_add_variable() in pre-config, set set_handler, and when I am doing "set $my_variable "0" " in nginx config, I get "duplicate variable my_variable" on nginx start up.
What I am doing wrong? May be I need to set variable by set, and In my module get index, and then get value of variable?
Subject Author Posted

add variable in module, change value in config

artemg October 26, 2011 11:36AM

Re: add variable in module, change value in config

Maxim Dounin October 26, 2011 12:20PM

Re: add variable in module, change value in config

artemg October 28, 2011 01:15AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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